CCeSocket::OnConnect
This method is called by the framework to notify the socket that its connection attempt has completed, whether it succeeded or failed. Override this method to do some special processing.
At a Glance
Header file: |
Wcesock.h |
Platforms: |
H/PC 2.0, Palm-size PC, H/PC Pro |
Windows CE versions: |
2.0 and later |
Syntax
virtual void OnConnect ( int nErrorCode );
Parameters
- nErrorCode
- Most recent error on a socket. Zero indicates that the method executed successfully. Otherwise, it is one of the following error values:
- 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 parameter to the CSocket::Accept method 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
None.
Remarks
This method calls CSocket::OnConnect by default.
See Also
CSocket::Accept, CSocket::OnConnect, CCeSocket::OnAccept