socket.h File Reference
#include <arpa/inet.h>
#include <stdbool.h>
#include <stdint.h>
#include <sys/socket.h>
Go to the source code of this file.
Data Structures | |
struct | socket_conn |
PubSub connection structure. More... | |
Functions | |
bool | kprv_socket_server_setup (socket_conn *conn, uint16_t port, uint8_t num_connections) |
Performs the low level init and setup of the server side tcp socket. More... | |
bool | kprv_socket_server_accept (const socket_conn *server_conn, socket_conn *client_conn) |
Attempts to accept a new socket connection - currently blocking. More... | |
bool | kprv_socket_client_connect (socket_conn *conn, uint16_t port) |
Attempts to open a socket connection. More... | |
bool | kprv_socket_close (socket_conn *conn) |
Performs low level shutdown and closure of connection. More... | |
bool | kprv_socket_send (const socket_conn *conn, const uint8_t *data_buffer, uint32_t data_length) |
Performs socket send. More... | |
bool | kprv_socket_recv (const socket_conn *conn, uint8_t *data_buffer, uint32_t data_length, uint32_t *length_read) |
Performs socket receive. More... | |