1.1.27.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,
errnoset.
Remarks
| errno | Description |
|---|---|
| EFAULT | System fault. |
| EAFNOSUPPORT | The implementation does not support the specified address family. |
| ENOMEM | Insufficient memory is available. |
| EBADMSG | Bad message. |
| EAGAIN | The socket is nonblocking, and the binding cannot be completed immediately. |
