connect TCP UDP

Connect a local socket to a remote socket address. See function NetSock_Conn() for more information.

Files

net_bsd.h/net_bsd.c

Prototype

int  connect (        int        sock_id,
              struct  sockaddr  *paddr_remote,
                      socklen_t  addr_len);

Arguments

sock_id

Socket descriptor/handle identifier of socket to connect.

p_addr_remote

Pointer to socket address structure.

addr_len

Length of socket address structure (in octets).

Returned Value

0, if no error(s).

-1, otherwise.