Udostępnij za pośrednictwem


CAsyncSocket::Close

Closes the socket.

virtual void Close( );

Remarks

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.

Requirements

Header: afxsock.h

See Also

Reference

CAsyncSocket Class

Hierarchy Chart

CAsyncSocket::Accept

CAsyncSocket::CAsyncSocket

CAsyncSocket::IOCtl

CAsyncSocket::GetSockOpt

CAsyncSocket::SetSockOpt

CAsyncSocket::AsyncSelect

Other Resources

CAsyncSocket Members