socket_bind |
Discworld driver help |
socket_bind |
Name
socket_bind() - bind a name to a socket
Synopsis
#include <socket_errors.h>
int socket_bind( int s, int port );
Description
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.
Errors
These errors are in <socket_errors.h>:
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. |