1.1.24.7 bind
C
int bind(int fd, const struct sockaddr *addr, socklen_t len)
Description
Bind a name to a socket.
Parameters
Parameters | Description |
---|---|
fd | Socket file descriptor. |
addr | Pointer to socket address. |
len | Length of socket address. |
Returns
0 - Success.
-1 - Error,
errno
set.
Remarks
errno | Description |
---|---|
EFAULT | System fault. |
ENOTSOCK | The file descriptor fd does not refer to a socket. |
EAFNOSUPPORT | The implementation does not support the specified address family. |
ENOMEM | Insufficient memory is available. |
EBADMSG | Bad message. |