.\"bind a name to a socket .TH socket_bind 3 .SH NAME socket_bind() - bind a name to a socket .SH SYNOPSIS .nf #include #include int socket_bind(int s, int port) .SH DESCRIPTION socket_bind() assigns a name to an unnamed socket. When a socket is created with socket_create(3) it exists in a name space (address family) but has no name assigned. socket_bind() requests that the port be assigned to the socket s. .SH RETURN VALUES socket_bind() returns: .IP EESUCCESS on success. .IP a negative value indicated below on error. .SH ERRORS .TP 15 EEFDRANGE Descriptor out of range. .TP EEBADF Descriptor is invalid. .TP EESECURITY Security violation attempted. .TP EEISBOUND Socket is already bound. .TP EEADDRINUSE Address already in use. .TP EEBIND Problem with bind. .TP EEGETSOCKNAME Problem with getsockname. .SH SEE ALSO socket_connect(3), socket_create(3), socket_listen(3)