#include <stdbool.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include "buff.h"
Go to the source code of this file.
|
int | hat_socket_setup () |
|
void | hat_socket_cleanup () |
|
int | hat_socket_addr_resolve (char *name, hat_socket_ip4_addr_t *host) |
|
int | hat_socket_addr_convert (char *addr, hat_socket_ip4_addr_t *host) |
|
int | hat_socket_open (hat_socket_t *s, int type) |
|
int | hat_socket_close (hat_socket_t *s) |
|
int | hat_socket_set_blocking (hat_socket_t *s, bool blocking) |
|
int | hat_socket_connect (hat_socket_t *s, hat_socket_ip4_addr_t host, hat_socket_port_t port) |
|
int | hat_socket_bind (hat_socket_t *s, hat_socket_ip4_addr_t host, hat_socket_port_t port) |
|
int | hat_socket_listen (hat_socket_t *s, int backlog) |
|
int | hat_socket_accept (hat_socket_t *s, hat_socket_t *client) |
|
int | hat_socket_send (hat_socket_t *s, hat_buff_t *data) |
|
int | hat_socket_send_to (hat_socket_t *s, hat_buff_t *data, hat_socket_ip4_addr_t host, hat_socket_port_t port) |
|
int | hat_socket_receive (hat_socket_t *s, hat_buff_t *data) |
|
int | hat_socket_receive_from (hat_socket_t *s, hat_buff_t *data, hat_socket_ip4_addr_t host, hat_socket_port_t port) |
|
◆ HAT_SOCKET_ERROR
#define HAT_SOCKET_ERROR (-1) |
◆ HAT_SOCKET_SUCCESS
#define HAT_SOCKET_SUCCESS 0 |
◆ HAT_SOCKET_TYPE_IP4_TCP
#define HAT_SOCKET_TYPE_IP4_TCP 0 |
◆ HAT_SOCKET_TYPE_IP4_UDP
#define HAT_SOCKET_TYPE_IP4_UDP 1 |
◆ hat_socket_ip4_addr_t
◆ hat_socket_port_t
◆ hat_socket_accept()
◆ hat_socket_addr_convert()
◆ hat_socket_addr_resolve()
◆ hat_socket_bind()
◆ hat_socket_cleanup()
void hat_socket_cleanup |
( |
| ) |
|
◆ hat_socket_close()
◆ hat_socket_connect()
◆ hat_socket_listen()
◆ hat_socket_open()
◆ hat_socket_receive()
◆ hat_socket_receive_from()
◆ hat_socket_send()
◆ hat_socket_send_to()
◆ hat_socket_set_blocking()
int hat_socket_set_blocking |
( |
hat_socket_t * |
s, |
|
|
bool |
blocking |
|
) |
| |
◆ hat_socket_setup()