CAsyncSocket::OnClose

virtualvoidOnClose(intnErrorCode**);**

Parameters

nErrorCode

The most recent error on a socket. The following error codes apply to the OnClose member function:

  • 0   The function executed successfully.

  • WSAENETDOWN   The Windows Sockets implementation detected that the network subsystem failed.

  • WSAECONNRESET   The connection was reset by the remote side.

  • WSAECONNABORTED   The connection was aborted due to timeout or other failure.

Remarks

Called by the framework to notify this socket that the connected socket is closed by its process. For more information, see the article in Visual C++ Programmer's Guide.

CAsyncSocket OverviewClass MembersHierarchy Chart

See Also   CAsyncSocket::Close, CAsyncSocket::GetLastError, CAsyncSocket::OnAccept, CAsyncSocket::OnConnect, CAsyncSocket::OnOutOfBandData, CAsyncSocket::OnReceive, CAsyncSocket::OnSend