CAsyncSocket::OnConnect

virtual void OnConnect( int nErrorCode );

Parameters

nErrorCode

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

Remarks

Called by the framework to notify this connecting socket that its connection attempt is completed, whether successfully or in error.

Important   In CSocket, the OnConnect notification function is never called.

For connections, you simply call Connect, which will return when the connection is completed (either successfully or in error). How connection notifications are handled is an MFC implementation detail.

 For more information, see the article Windows Sockets: Socket Notifications in Visual C++ Programmer's Guide.

CAsyncSocket OverviewClass MembersHierarchy Chart

See Also   CAsyncSocket::Connect, CAsyncSocket::GetLastError, CAsyncSocket::OnAccept, CAsyncSocket::OnClose, CAsyncSocket::OnOutOfBandData, CAsyncSocket::OnReceive, CAsyncSocket::OnSend