Go to the previous, next section.

bind

SYNOPSIS

int bind(int sockfd, struct sockaddr *my_addr, int addrlen);

PARAMETERS

sockfd: [in] the socket to bind.

my_addr: [in] the address to bind the socket to.

addrlen: [in] the length of addr (in bytes).

DESCRIPTION

Binds the socket sockfd to the local address my_addr. The format of the address is network dependent.

RETURN VALUE

On success zero is returned. On error, -1 is returned and errno is set to one of the following values:

Go to the previous, next section.