#include <rtl.h>
BOOL tcp_connect (
U8 socket, /* Socket handle of the local machine. */
U8* remip, /* Pointer to IP address of remote machine. */
U16 remport, /* Port number of remote machine. */
U16 locport ); /* Port number of local machine. */
Description
The tcp_connect function initiates a connection to a remote
server. The argument socket is a handle to the socket to use
for communication on the local machine. The argument locport
specifies the port to use for communication on the local machine. If
locport is set to 0, TCPnet automatically allocates the first
free TCP port.
The argument remip points to the buffer containing the ip
address octets of the remote server to connect to. The argument
remport specifies the TCP port number on the remote machine to
communicate with.
The tcp_connect function is in the RL-TCPnet library. The
prototype is defined in rtl.h.
note
Only a socket of type TCP_TYPE_CLIENT or TCP_TYPE_CLIENT_SERVER
can call the tcp_connect function.
Return Value
The tcp_connect function returns __TRUE when the connection
establishment procedure has been started successfully. Otherwise, the
function returns __FALSE.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.