Atrinik Server  4.0
Functions | Variables
init.c File Reference
#include "zlib.h"
#include <global.h>
#include <toolkit/packet.h>
#include <toolkit/string.h>
#include <exp.h>
#include <toolkit/path.h>

Go to the source code of this file.


bool init_connection (socket_struct *ns)
void free_all_newserver (void)
void free_newsocket (socket_struct *ns)
static void load_srv_file (char *fname, FILE *listing)
static void create_server_settings (void)
static void create_server_animations (void)
void init_srv_files (void)


Socket_Info socket_info

Detailed Description

Socket initialization related code.

Definition in file init.c.

Function Documentation

static void create_server_animations ( void  )

Initialize animations file for the client.

Definition at line 243 of file init.c.

static void create_server_settings ( void  )

Get the lib/server_settings default file and create the data/server_settings file from it.

Definition at line 202 of file init.c.

void free_all_newserver ( void  )

Frees all the memory that ericserver allocates.

Definition at line 89 of file init.c.

void free_newsocket ( socket_struct ns)

Basically, all we need to do here is free all data structures that might be associated with the socket.

It is up to the caller to update the list.

nsThe socket.

Definition at line 113 of file init.c.

bool init_connection ( socket_struct ns)

Initializes a connection - really, it just sets up the data structure, socket setup is handled elsewhere.

Sends server version to the client.

nsClient's socket.

Definition at line 51 of file init.c.

void init_srv_files ( void  )

Load all the server files we can send to client.

client_bmaps is generated from the server at startup out of the Atrinik png file.

Definition at line 287 of file init.c.

static void load_srv_file ( char *  fname,
FILE *  listing 

Load server file.

fnameFilename of the server file.
listingOpen file pointer to the listings file.
cmdThe data command.

Definition at line 142 of file init.c.

Variable Documentation

socket_struct* init_sockets

Established connections for clients not yet playing.

Definition at line 41 of file init.c.

Socket_Info socket_info

Socket information.

Definition at line 39 of file init.c.