//include <libnet.h>

#define MAX_CLIENTS GP_MAX_PLAYERS

#define BACKLOG 3

extern int listenSocket;
extern int ClientConn[MAX_CLIENTS];
extern int ClientNum;

int ServerInit();
void ServerExit();
int ServerListen();
void ServerStopListening();

void serverRegister();

int serverGetMessageId(SOCKET s);
void serverGetMessage(SOCKET s, int size);
void serverProcessMessage(int who, int id);

void ServerBroadcast(unsigned char *data, int len);
void ServerSendTo(unsigned char *data, int len, int who);
