The closesocket function closes an existing socket. - s [in] A
descriptor identifying the socket to close. If no error occurs,
closesocket returns zero. Otherwise, a value of SOCKET_ERROR is
returned, and a specific error code can be retrieved by calling
WSAGetLastError. A successful WSAStartup call must occur before
using this function. The network subsystem has failed. The
descriptor is not a socket. A blocking Windows Sockets 1.1 call
is in progress, or the service provider is still processing a
callback function. The (blocking) Windows Socket 1.1 call was
canceled through WSACancelBlockingCall. The socket is marked as
nonblocking, but the l_onoff member of the linger structure is
set to nonzero and the l_linger member of the linger structure
is set to a nonzero timeout value. The closesocket function
closes a socket. Use it to release the socket descriptor passed
in the s parameter. Note that the socket descriptor passed in
the s parameter may immediately be reused by the system as soon
as closesocket fun