#define | u_net_write(sd, buf, nbytes, nw, iseof) u_io((iof_t) write, sd, buf, nbytes, nw, iseof) |
u_io specialisation for output ops | |
#define | u_net_read(sd, buf, nbytes, nw, iseof) u_io(read, sd, buf, nbytes, nw, iseof) |
u_io specialisation for input ops | |
#define | u_net_writen(sd, buf, nbytes) u_io((iof_t) write, sd, buf, nbytes, 0, 0) |
Try to write a chunk of nbytes data to descriptor sd . | |
#define | u_net_readn(sd, buf, nbytes) u_io(read, sd, buf, nbytes, 0, 0) |
Try to read a chunk of nbytes data from descriptor sd . | |
Functions | |
int | u_net_sock (const char *uri, int mode) |
Top level socket creation routine. | |
int | u_net_sock_tcp (u_net_addr_t *a, int mode) |
int | u_net_sock_unix (u_net_addr_t *a, int mode) |
int | u_net_unix_csock (struct sockaddr_un *sad) |
int | u_net_unix_ssock (struct sockaddr_un *sad, int backlog) |
int | u_net_sock_udp (u_net_addr_t *a, int mode) |
int | u_net_tcp6_ssock (struct sockaddr_in6 *sad, int reuse, int backlog) |
int | u_net_tcp6_csock (struct sockaddr_in6 *sad) |
int | u_net_tcp4_ssock (struct sockaddr_in *sad, int reuse, int backlog) |
int | u_net_tcp4_csock (struct sockaddr_in *sad) |
int | u_net_uri2addr (const char *uri, u_net_addr_t **pa) |
int | u_net_uri2sun (const char *uri, struct sockaddr_un *sad) |
int | u_net_addr_new (int type, u_net_addr_t **pa) |
void | u_net_addr_free (u_net_addr_t *a) |
int | u_net_uri2sin (u_uri_t *uri, struct sockaddr_in *sad) |
|
This routine creates a socket and returns its file descriptor. A client socket ( The identification is done via a family of private URIs:
After resolving the supplied URI, the control is passed to the appropriate handler which carries out the real job (i.e.
Definition at line 55 of file net.c. References u_net_addr_s::type, u_net_addr_free(), u_net_sock_tcp(), u_net_sock_unix(), and u_net_uri2addr(). |