我认为没有必要继续调用closesocket。 closesocket出错有以下原因,一些是给程序员错误使用设置的,还有1.1版本的基本不用了,WSAENETDOWN是驱动程序或硬件故障 :WSANOTINITIALISED A successful WSAStartup must occur before using this function. WSAENETDOWN The network subsystem has failed. WSAENOTSOCK The descriptor is not a socket. WSAEINPROGRESS A blocking Windows Sockets 1.1 call is in progress, or the service provider is still processing a callback function. WSAEINTR The (blocking) Windows Socket 1.1 call was canceled through WSACancelBlockingCall. WSAEWOULDBLOCK The socket is ed as nonblocking and SO_LINGER is set to a nonzero time-out value.
closesocket出错有以下原因,一些是给程序员错误使用设置的,还有1.1版本的基本不用了,WSAENETDOWN是驱动程序或硬件故障 :WSANOTINITIALISED A successful WSAStartup must occur before using this function.
WSAENETDOWN The network subsystem has failed.
WSAENOTSOCK The descriptor is not a socket.
WSAEINPROGRESS A blocking Windows Sockets 1.1 call is in progress, or the service provider is still processing a callback function.
WSAEINTR The (blocking) Windows Socket 1.1 call was canceled through WSACancelBlockingCall.
WSAEWOULDBLOCK The socket is ed as nonblocking and SO_LINGER is set to a nonzero time-out value.