Embedded TCP/IP stack
4.1.0
|
Establishes a connection with the specified socket.
For connection-oriented sockets (SOCK_STREAM), this function activates an active connection with the foreign host. When the socket call completes successfully, the socket is ready to send and receive data. Any attempt to reconnect the active connection will fail with the error code FNET_ERR_ISCONN. For connection-oriented sockets, it is often not possible to complete the connection immediately. Until the connection attempt completes on a socket, all subsequent calls to fnet_socket_connect() on the same socket will fail with the error code FNET_ERR_INPROGRESS, or succeed with FNET_ERR_ISCONN when the connection completes successfully. Use the fnet_socket_getopt() function to determine the completion of the connection request by checking the SO_STATE to see if the socket is connected (SS_CONNECTED), is still connecting (SS_CONNECTING) or the connection has failed (SS_UNCONNECTED). |
© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net