TCPIP_TCP_Connect Function

C

bool TCPIP_TCP_Connect(
    TCP_SOCKET hTCP
);

Description

This function will try to initiate a connection on a client socket that is not connected yet. The client socket should have been created with a call to TCPIP_TCP_ClientOpen having the remoteAddress set to 0.

Preconditions

TCP socket should have been opened with TCPIP_TCP_ServerOpen()/TCPIP_TCP_ClientOpen(). hTCP - valid socket.

Parameters

ParametersDescription
hTCPHandle to the client socket to connect.

Returns

  • True - Indicates success.

  • False - Indicates failure.

Remarks

The call will fail if the client socket has no remote host specified. Use TCPIP_TCP_RemoteBind() to specify a remote host address for the client socket.