Transport implementation interface. More...
Data Structures | |
struct | socket_transport |
The transport interface. More... | |
Typedefs | |
typedef uint32_t(* | tr_open_t )(socket_t *p_socket) |
Function for opening a socket. | |
typedef uint32_t(* | tr_connect_t )(socket_t *p_socket, const void *p_addr, socklen_t addrlen) |
Function for connecting a socket to an address. | |
typedef uint32_t(* | tr_send_t )(socket_t *p_socket, const void *p_buf, uint32_t len, int flags, const void *p_destaddr, socklen_t destaddr_len) |
Function for sending data on a socket. | |
typedef uint32_t(* | tr_recv_t )(socket_t *p_socket, void *p_buf, uint32_t *sz, int flags, void *p_srcaddr, socklen_t *p_srcaddr_len) |
Function for receiving data from a socket. | |
typedef uint32_t(* | tr_bind_t )(socket_t *p_socket, const void *p_addr, socklen_t addrlen) |
Function for binding a socket to an address and port. | |
typedef uint32_t(* | tr_listen_t )(socket_t *p_socket, int backlog) |
Function for listening on a socket. | |
typedef uint32_t(* | tr_accept_t )(socket_t *p_socket, socket_t *p_client, void *p_client_addr, socklen_t *p_client_addr_len) |
Function for accepting a connection on a socket. | |
typedef uint32_t(* | tr_close_t )(socket_t *p_socket) |
Function for closing a socket. | |
typedef uint32_t(* | tr_setsockopt_t )(socket_t *p_socket, int level, int optname, const void *p_optval, socklen_t optlen) |
Function for setting options on a socket. | |
typedef uint32_t(* | tr_getsockopt_t )(socket_t *p_socket, int level, int optname, void *p_optval, socklen_t *p_optlen) |
Function for getting options from a socket. | |
typedef struct socket_transport | socket_transport_t |
The transport interface. | |
Transport implementation interface.
The transport interface defines the hook to be used for socket transport. The implementation of this interface would be different across platforms and event IP stacks (i.e. Nordic IPv6 vs LwIP).