#include <arpa/inet.h>

Data Structures | |
| struct | tcp_conf |
Functions | |
| struct tcp_server * | tcp_server_create (struct tcp_conf *conf) |
| void | tcp_server_destroy (struct tcp_server *c) |
| int | tcp_server_get_fd (struct tcp_server *c) |
| int | tcp_server_accept (struct tcp_server *c, struct sockaddr_in *addr) |
| struct tcp_client * | tcp_client_create (struct tcp_conf *conf) |
| void | tcp_client_destroy (struct tcp_client *c) |
| int | tcp_client_get_fd (struct tcp_client *c) |
| ssize_t | tcp_client_send (struct tcp_client *c, const void *data, int size) |
| ssize_t | tcp_client_recv (struct tcp_client *c, void *data, int size) |
| void | tcp_client_set_data (struct tcp_client *c, void *data) |
| void * | tcp_client_get_data (struct tcp_client *c) |
| struct tcp_client* tcp_client_create | ( | struct tcp_conf * | conf | ) |
| void tcp_client_destroy | ( | struct tcp_client * | c | ) |
References tcp_client::fd.
| void* tcp_client_get_data | ( | struct tcp_client * | c | ) |
References tcp_client::data.
| int tcp_client_get_fd | ( | struct tcp_client * | c | ) |
References tcp_client::fd.
Referenced by tcp_client_start().

| ssize_t tcp_client_recv | ( | struct tcp_client * | c, |
| void * | data, | ||
| int | size | ||
| ) |
References tcp_client::addr, tcp_client::fd, tcp_client::socklen, tcp_client::state, TCP_CONNECTED, TCP_CONNECTING, and TCP_DISCONNECTED.
| ssize_t tcp_client_send | ( | struct tcp_client * | c, |
| const void * | data, | ||
| int | size | ||
| ) |
References tcp_client::addr, tcp_client::fd, tcp_client::socklen, tcp_client::state, TCP_CONNECTED, TCP_CONNECTING, and TCP_DISCONNECTED.
| void tcp_client_set_data | ( | struct tcp_client * | c, |
| void * | data | ||
| ) |
References tcp_client::data, and data.
| int tcp_server_accept | ( | struct tcp_server * | c, |
| struct sockaddr_in * | addr | ||
| ) |
References tcp_server::fd.
| struct tcp_server* tcp_server_create | ( | struct tcp_conf * | conf | ) |
References tcp_server::addr, tcp_sock::addr, tcp_sock::conf, tcp_server::fd, tcp_sock::fd, tcp_conf::ipproto, tcp_conf::ipv4, tcp_server::ipv4, tcp_sock::ipv4, tcp_conf::ipv6, tcp_server::ipv6, tcp_sock::ipv6, NULL, tcp_conf::port, tcp_conf::rcvbuf, tcp_conf::server, SO_RCVBUFFORCE, tcp_sock::sockaddr_len, tcp_sock::state, TCP_SERVER_ACCEPTING, and TCP_SERVER_LISTEN.
| void tcp_server_destroy | ( | struct tcp_server * | c | ) |
References tcp_server::fd.
| int tcp_server_get_fd | ( | struct tcp_server * | c | ) |
References tcp_server::fd.
Referenced by tcp_server_start().
