bind TCP UDP

Assign network addresses to sockets. See function NetSock_Bind() for more information.

Files

net_bsd.h/net_bsd.c

Prototype

int  bind (        int        sock_id,
           struct  sockaddr  *p_addr_local,
                   socklen_t  addr_len);

Arguments

sock_id

Socket descriptor/handle identifier of socket to bind to a local address.

p_addr_local

Pointer to socket address structure.

addr_len

Length of socket address structure (in octets).

Returned Value

0, if no errors.

-1, otherwise.