#ifndef H_SATORI_SOCK #define H_SATORI_SOCK #include #include #include #include #include #include #include #include #include #include #include #include #include typedef struct _sat_sock { int sock; } sat_sock, *sat_sock_ptr; sat_sock_ptr sat_sock_alloc(void); void sat_sock_free(sat_sock_ptr ctx); int sat_sock_connect(sat_sock_ptr ctx, int addrFamily, int sockType, char *host, char *port); int sat_sock_connect_tcp(sat_sock_ptr ctx, char *host, char *port); void sat_sock_close(sat_sock_ptr ctx); bool sat_sock_get_blocking(sat_sock_ptr ctx); void sat_sock_set_blocking(sat_sock_ptr ctx, bool blocking); int sat_sock_recv(sat_sock_ptr ctx, uint8_t *buffer, size_t size); int sat_sock_send(sat_sock_ptr ctx, uint8_t *buffer, size_t count); int sat_sock_select(sat_sock_ptr ctx, int timeout); #endif // H_SATORI_SOCK