The shutdown function is used on all types of sockets to disable reception, transmission, or both.
The shutdown function does not close the socket. Any resources attached to the socket will not be freed until closesocket is invoked.
This function releases the socket descriptor so that further references to it will fail with the error WSAENOTSOCK. If this is the last reference to the underlying socket, the associated naming information and queued data are discarded. The socket object's destructor calls Close for you.
For CAsyncSocket, but not for CSocket, the semantics of Close are affected by the socket options SO_LINGER and SO_DONTLINGER. For further information, see member function GetSockOpt.