.\"bind a name to a socket .DT socket_bind $MUDNAME$ driver help socket_bind .SH Name .SI 5 socket_bind() - bind a name to a socket .EI .SH Synopsis .SI 5 #include <socket_errors.h> int socket_bind( int s, int port ); .EI .SH Description .SP 5 5 socket_bind() assigns a name to an unnamed socket. When a socket is created with socket_create() it exists in a name space (address family) but has no name assigned. socket_bind() requests that `port' be assigned to the socket `s'. socket_bind() returns EESUCCESS on success, and a negative value indicated below on error. .EP .SH Errors .SI 5 These errors are in <socket_errors.h>: .EI .SO 10 15 45 EEFDRANGE Descriptor out of range. EEBADF Descriptor is invalid. EESECURITY Security violation attempted. EEISBOUND Socket is already bound. EEADDRINUSE Address already in use. EEBIND Problem with bind. EEGETSOCKNAME Problem with getsockname. .EO .SH See also .SI 5 socket_connect(), socket_create(), socket_listen() .EI