bind a name to a socket
cc ... -lsocket
int bind (s, name, namelen)
const struct sockaddr *name;
assigns a name to an unnamed socket.
When a socket is created with
it exists in a name space (address family)
but has no name assigned.
requests that name be assigned to the socket.
The rules used in name binding vary between ``communication domains''.
for more information.)
Consult the manual entries
in the ADMP and SFF sections
for detailed information.
A return value of zero indicates that the call succeeded.
A return value of -1 indicates that an error occurred, and in this
case an error code is stored in the global variable errno.
call will fail if:
s is not a valid descriptor.
s is not a socket.
The specified address is not available from the local machine.
The specified address is already in use.
The socket is already bound to an address.
The requested address is protected, and the current user
has inadequate permission to access it.
The name parameter is not in a valid part
of the user address space.
Currently, only the Internet and UNIX address families are supported.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003