CCeSocket::OnConnect

This member function is called by the framework to notify the socket that its connection attempt has completed, whether it succeeded or failed. Override this member function if you want to do some special processing.

Syntax

virtual void OnConnect ( int nErrorCode );

At a Glance

Header file: Wcesock.h
Platforms:
Versions: 2.0 and later

Parameters

nErrorCode
The most recent error on a socket. Zero indicates the function executed successfully. The error code may be any of the following:
WSAEADDRINUSE
The specified address is already in use.
WSAEADDRNOTAVAIL
The specified address is not available from the local machine.
WSAEAFNOSUPPORT
Addresses in the specified family cannot be used with this socket.
WSAECONNREFUSED
The attempt to connect was forcefully rejected.
WSAEDESTADDRREQ
A destination address is required.
WSAEFAULT
The lpSockAddrLen argument to the CSocket::Accept function is incorrect.
WSAEINVAL
The socket is already bound to an address.
WSAEISCONN
The socket is already connected.
WSAEMFILE
No more file descriptors are available.
WSAENETUNREACH
The network cannot be reached from this host at this time.
WSAENOBUFS
No buffer space is available. The socket cannot be connected.
WSAENOTCONN
The socket is not connected.
WSAENOTSOCK
The descriptor is a file, not a socket.
WSAETIMEDOUT
The attempt to connect timed out without establishing a connection.

Return Values

This function has no return value.

Remarks

This function calls CSocket::OnConnect by default.

See Also

CCeSocket Overview, CCeSocket Member Functions, Windows Sockets Classes, CSocket::Accept, CSocket::OnConnect, CCeSocket::OnAccept