CAsyncSocket::Close

This member function closes the socket. This function releases the socket descriptor, so 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.

Syntax

virtual void Close( );

At a Glance

Header file: Afxsock.h
Platforms:
Versions: 2.0 and later
Complete documentation Visual C++ documentation

See Also

CAsyncSocket Overview, CAsyncSocket Member Functions, Windows Sockets Classes, CAsyncSocket::Accept, CAsyncSocket::CAsyncSocket, CAsyncSocket::IOCtl, CAsyncSocket::GetSockOpt, CAsyncSocket::SetSockOpt