#ifndef _UC_NET_H_
#define _UC_NET_H_
#include <inttypes.h>

typedef struct uc_header
{
    short sequence_nr;
    short flags;
    int size;
} uc_header;

struct addrinfo *uc_addrinfo(const char *addr, const char *port,
                             struct addrinfo *hints);

int uc_server_socket(const char *addr, const char *port);
int uc_client_socket(const char *addr, const char *port);
int uc_socket(struct addrinfo *result, struct addrinfo *hints);
int uc_connect(int socket, struct addrinfo *result);
void uc_reuseaddr(int socket);
uc_header get_header(uint8_t *buffer);

#endif
