共用方式為


CAsyncSocket::OnAccept

Called by the framework to notify a listening socket that it can accept pending connection requests by calling the Accept member function.

virtual void OnAccept(
   int nErrorCode 
);

Parameters

  • nErrorCode
    The most recent error on a socket. The following error codes applies to the OnAccept member function:

    • 0   The function executed successfully.

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

Remarks

For more information, see Windows Sockets: Socket Notifications.

Requirements

Header: afxsock.h

See Also

Reference

CAsyncSocket Class

Hierarchy Chart

CAsyncSocket::Accept

CAsyncSocket::GetLastError

CAsyncSocket::OnClose

CAsyncSocket::OnConnect

CAsyncSocket::OnOutOfBandData

CAsyncSocket::OnReceive

CAsyncSocket::OnSend

Other Resources

CAsyncSocket Members