| BIND(2) | 21 January 1990 | BIND(2) |
| NAME |
| bind - bind a name to a socket |
| SYNOPSIS |
|
int bind(s, name, namelen) int s; struct sockaddr *name; int namelen; |
| DESCRIPTION |
|
bind() assigns a name to an unnamed socket. When a socket is created with socket(2) it exists in a name space (address family) but has no name assigned. bind() requests that the name pointed to by name be assigned to the socket. |
| RETURN |
|
bind() returns:
|
| ERRORS |
The following errors are specific to binding names in the UNIX domain:
|
| SEE |
| connect(2), getsockname(2), listen(2), socket(2), unlink(2V) |
| NOTES |
|
Binding a name in the UNIX domain creates a socket in the file system that must be deleted by the caller when it is no longer needed (using unlink(2V), The rules used in name binding vary between communication domains. Consult the manual entries in section 4 for detailed information. |
| BIND(2) | 21 January 1990 | BIND(2) |