#include <netinet/in.h>
#include "clientcommands.h"
#include "servercommands.h"
-#include "linkedlist.h"
+#include "list.h"
#include "map.h"
#include "network.h"
typedef struct
{
int sockfd;
+ List clients;
Map *map;
- LinkedList clients;
} Server;
typedef struct Client
{
int fd;
- char *name;
+ pthread_mutex_t mtx;
+ ClientState state;
char *address;
+ char *name;
Server *server;
- ClientState state;
- pthread_mutex_t mtx;
+ pthread_t thread;
+ v3f pos;
} Client;
typedef enum
DISCO_NO_MESSAGE = 0x04,
} DiscoFlag;
-char *server_get_client_name(Client *client);
void server_disconnect_client(Client *client, int flags, const char *detail);
-void server_shutdown(Server *srv);
+void server_shutdown();
#endif