#include <oskit/net/socket.h>oskit_error_t oskit_socket_bind(oskit_socket_t *s, const struct oskit_sockaddr *name, oskit_size_t namelen);
bind assigns a name to an unnamed socket. When a socket is created, it exists in a name space (address family) but has no name assigned. bind requests that name be assigned to the socket.
- s
- The socket to which a name is to be bound.
- name
- The name to which the socket is to be bound.
- namelen
- The length of name in bytes.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.