Apparently, whenever the closesocket
function fails with WSAENETDOWN
, “The network subsystem has failed”. But what exactly does that mean? When does it happen? If it does happen, is the socket descriptor still closed? How should I handle it?
Regarding my first question, the Windows Sockets Error Codes page says that WSAENETDOWN
means
Network is down.
A socket operation encountered a dead network. This could indicate a serious failure of the network system (that is, the protocol stack that the Windows Sockets DLL runs over), the network interface, or the local network itself.
But that does not really help me either.
Note that POSIX ENETDOWN
is only specified for connect
, send
, sendto
, sendmsg
, write
, not for close
. The Winsock counterpart is more ubiquitous.