The friendly Operating System for the Internet of Things

TCP connection definitions. More...

Detailed Description

#include <stdint.h>
#include <stdlib.h>
+ Include dependency graph for conn/tcp.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct conn_tcp conn_tcp_t
 Implementation-specific type of a TCP connection object.
 

Functions

int conn_tcp_create (conn_tcp_t *conn, const void *addr, size_t addr_len, int family, uint16_t port)
 Creates a new TCP connection object. More...
 
void conn_tcp_close (conn_tcp_t *conn)
 Closes a TCP connection. More...
 
int conn_tcp_getlocaladdr (conn_tcp_t *conn, void *addr, uint16_t *port)
 Gets the local address of a TCP connection. More...
 
int conn_tcp_getpeeraddr (conn_tcp_t *conn, void *addr, uint16_t *port)
 Gets the address of the connected peer of a TCP connection. More...
 
int conn_tcp_connect (conn_tcp_t *conn, const void *addr, size_t addr_len, uint16_t port)
 Connects to a remote TCP peer. More...
 
int conn_tcp_listen (conn_tcp_t *conn, int queue_len)
 Marks connection to listen for a connection request by a remote TCP peer. More...
 
int conn_tcp_accept (conn_tcp_t *conn, conn_tcp_t *out_conn)
 Receives and handles TCP connection requests from other peers. More...
 
int conn_tcp_recv (conn_tcp_t *conn, void *data, size_t max_len)
 Receives a TCP message. More...
 
int conn_tcp_send (conn_tcp_t *conn, const void *data, size_t len)
 Sends a TCP message. More...