This function assigns a port number and IP address to an unnamed socket. When a socket is created with the socket() function, it exists in a name space (address family) but has no name assigned. The bind() function requests that a name be assigned to the socket. Related Functions See also connect(), getsockname(), listen(), and socket().