This topic has not yet been rated - Rate this topic

CAsyncSocket::Close 

Closes the socket.


virtual void Close( );

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.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ