sdl-audio/net.h

23 lines
424 B
C
Raw Permalink Normal View History

#ifndef NET_H
#define NET_H
#include <arpa/inet.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <ifaddrs.h>
#define CLIENT_MAX_TIME 4
int net_init(unsigned int port);
void net_destroy();
int net_broadcast();
int net_listen_peers();
int net_prune_peers();
int net_send(void* buffer, size_t size);
int net_receive();
void net_print_peers();
int net_get_peers(struct sockaddr_in** peer_addr);
#endif