#include <stdio.h>

#include "network.h"

static int num_clients;

static int driver_count = 0;
static int init = 0;

void network_init(char *configfile)
{
   init = 1;
}

int get_nr_network_drivers(void)
{
   return driver_count;
}

char *get_network_driver_name(int n)
{
   return NULL;
}

/*******************/
/*  Server code    */
/*******************/

/* Return TRUE if the server was started succesfully */
int start_server(int driver_nr)
{
   num_clients = 0;
   
   return 0;
}

/* Shut the server down. */
void shutdown_server(void)
{
   num_clients = 0;
}

/* Check for connecting clients.
   0 = no new connection yet 
   >0 number of open connections
*/
int server_listen(void)
{
   return 0;
}

/* Receive data from a client, and store them in the provided array (must
   have room for 1024 bytes). Returns the size of the stored data. */
int server_receive(void *data, int *sender)
{
   return 0;
}

/* Send data to a specific client. */
void server_send(void *data, int len, int whom)
{
}

/* Send data to all connected clients. */
void server_send_all(void *data, int len)
{
}

/* Tell the server to disconnect a client */
void server_disconnect_client(int whom)
{
}

/*******************/
/*  Client code    */
/*******************/

int start_client(const char *serveraddress, const int driver_nr)
{
   num_clients = 0;
   
   return 0;
}

void shutdown_client(void)
{
}

/* Returns 1 if the connection between the client and the server is up */
/* Returns 0 if there is no connection yet */
/* Returns < 0 if there was an error */
int client_is_connected(void) 
{
   return -1;
}

/* Receive data from the server, and store them in the provided array (must
   have room for 1024 bytes). Returns the size of the stored data. */
int client_receive(void *data)
{
   return 0;
}

/* Send data to the server. */
void client_send(void *data, int len)
{
}
