Go to the documentation of this file.
299 #ifndef NET_SOCK_TCP_H
300 #define NET_SOCK_TCP_H
304 #include <sys/types.h>
308 #if defined (__clang__)
309 # pragma clang diagnostic push
310 # pragma clang diagnostic ignored "-Wtypedef-redefinition"
337 #if defined (__clang__)
338 # pragma clang diagnostic pop
372 uint16_t local_port, uint16_t flags);
542 #include "sock_types.h"
unsigned short len
Length of the struct sock_tcp_queue::array.
ssize_t sock_tcp_read(sock_tcp_t *sock, void *data, size_t max_len, uint32_t timeout)
Reads data from an established TCP stream.
int sock_tcp_get_local(sock_tcp_t *sock, sock_tcp_ep_t *ep)
Gets the local end point of a TCP sock object.
ssize_t sock_tcp_write(sock_tcp_t *sock, const void *data, size_t len)
Writes data to an established TCP stream.
int sock_tcp_get_remote(sock_tcp_t *sock, sock_tcp_ep_t *ep)
Gets the remote end point of a TCP sock object.
void sock_tcp_disconnect(sock_tcp_t *sock)
Disconnects a TCP connection.
Common IP-based transport layer end point.
int sock_tcp_accept(sock_tcp_queue_t *queue, sock_tcp_t **sock, uint32_t timeout)
Receives and handles TCP connection requests from other peers.
int sock_tcp_queue_get_local(sock_tcp_queue_t *queue, sock_tcp_ep_t *ep)
Gets the local end point of a TCP sock queue object.
int sock_tcp_listen(sock_tcp_queue_t *queue, const sock_tcp_ep_t *local, sock_tcp_t *queue_array, unsigned queue_len, uint16_t flags)
Listen for an incoming connection request on local end point.
Common sock API definitions.
void sock_tcp_stop_listen(sock_tcp_queue_t *queue)
Stops listening on TCP listening queue.
int sock_tcp_connect(sock_tcp_t *sock, const sock_tcp_ep_t *remote, uint16_t local_port, uint16_t flags)
Establishes a new TCP sock connection.