Compartilhar via


CAsyncSocket::OnClose

Called by the framework to notify this socket that the connected socket is closed by its process.

virtual void OnClose( 
   int nErrorCode  
);

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

For more information, see Windows Sockets: Socket Notifications.

Requirements

Header: afxsock.h

See Also

Reference

CAsyncSocket Class

Hierarchy Chart

CAsyncSocket::Close

CAsyncSocket::GetLastError

CAsyncSocket::OnAccept

CAsyncSocket::OnConnect

CAsyncSocket::OnOutOfBandData

CAsyncSocket::OnReceive

CAsyncSocket::OnSend