Crossfire Client, Branch  R11627
Data Structures | Defines | Typedefs | Functions | Variables
client.c File Reference
#include <client.h>
#include <external.h>
#include <errno.h>
#include <script.h>
#include <ctype.h>
#include "mapdata.h"
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
Include dependency graph for client.c:

Go to the source code of this file.

Data Structures

struct  CmdMapping

Defines

#define NCOMMANDS   ((int)(sizeof(commands)/sizeof(struct CmdMapping)))

Typedefs

typedef void(* CmdProc )(unsigned char *, int len)

Functions

void DoClient (ClientSocket *csocket)
int init_connection (char *host, int port)
void negotiate_connection (int sound)

Variables

char * client_libdir = NULL
int command_inscribe = 0
struct CmdMapping commands []
Client_Player cpl
ClientSocket csocket
uint64 * exp_table = NULL
uint16 exp_table_max = 0
int last_used_skills [MAX_SKILL+1]
int maxfd
int meta_port = META_PORT
char * meta_server = META_SERVER
int metaserver2_on = METASERVER2
int metaserver_on = METASERVER
const char *const rcsid_common_client_c = "$Id: client.c 9215 2008-06-02 18:31:04Z anmaster $"
int replyinfo_last_face = 0
int replyinfo_status = 0
int requestinfo_sent = 0
const char *const resists_name [NUM_RESISTS]
char * server = NULL
char * skill_names [MAX_SKILL]
char * sound_server = "cfsndserv"
uint32 tick = 0
char VERSION_INFO [256]
int want_skill_exp = 0

Define Documentation

#define NCOMMANDS   ((int)(sizeof(commands)/sizeof(struct CmdMapping)))

Definition at line 147 of file client.c.

Referenced by DoClient().


Typedef Documentation

typedef void(* CmdProc)(unsigned char *, int len)

Definition at line 87 of file client.c.


Function Documentation

void DoClient ( ClientSocket csocket)

Definition at line 149 of file client.c.

References SockList::buf, CmdMapping::cmdformat, CmdMapping::cmdname, CmdMapping::cmdproc, ClientSocket::fd, ClientSocket::inbuf, SockList::len, MAXSOCKBUF, NCOMMANDS, script_watch(), and SockList_ReadPacket().

Referenced by do_network(), event_loop(), and negotiate_connection().

Here is the call graph for this function:

Here is the caller graph for this function:

int init_connection ( char *  host,
int  port 
)

Definition at line 205 of file client.c.

References CONFIG_FASTTCP, LOG(), LOG_ERROR, LOG_WARNING, ClientSocket::servername, SOL_TCP, and use_config.

Referenced by main(), metaserver_connect_to(), metaserver_select(), and on_metaserver_select_clicked().

Here is the call graph for this function:

Here is the caller graph for this function:

void negotiate_connection ( int  sound)

Variable Documentation

char* client_libdir = NULL

Definition at line 61 of file client.c.

Referenced by init_client_vars(), init_keys(), and keys_init().

Definition at line 75 of file client.c.

Referenced by inscribe_magical_scroll(), menu_spells(), and SetupCmd().

struct CmdMapping commands[]

Definition at line 96 of file client.c.

uint64* exp_table = NULL

Definition at line 73 of file client.c.

Referenced by draw_message_window(), get_exp_info(), and init_client_vars().

Definition at line 72 of file client.c.

Referenced by draw_message_window(), get_exp_info(), and init_client_vars().

Definition at line 65 of file client.c.

Referenced by draw_stats(), init_client_vars(), and use_skill().

int maxfd

Definition at line 68 of file client.c.

Referenced by do_network(), event_loop(), and main().

Definition at line 67 of file client.c.

Referenced by do_metaserver(), main(), and metaserver1_thread().

Definition at line 61 of file client.c.

Referenced by do_metaserver(), main(), metaserver1_thread(), and metaserver_select().

Definition at line 69 of file client.c.

Referenced by metaserver2_get_info().

Definition at line 69 of file client.c.

Referenced by metaserver1_get_info(), and metaserver_get_info().

const char* const rcsid_common_client_c = "$Id: client.c 9215 2008-06-02 18:31:04Z anmaster $"

Definition at line 1 of file client.c.

Definition at line 68 of file client.c.

Referenced by get_image_sums(), and negotiate_connection().

Definition at line 68 of file client.c.

Referenced by get_image_info(), and negotiate_connection().

Definition at line 68 of file client.c.

Referenced by negotiate_connection().

const char* const resists_name[NUM_RESISTS]
Initial value:
 {
"armor", "magic", "fire", "elec",
"cold", "conf", "acid", "drain",
"ghit", "pois", "slow", "para",
"t undead", "fear", "depl","death",
"hword", "blind"}

Definition at line 80 of file client.c.

Referenced by draw_message_window(), and update_stat_mapping().

char* server = NULL
char* sound_server = "cfsndserv"

Definition at line 62 of file client.c.

Referenced by init_sounds(), init_windows(), load_defaults(), parse_args(), and save_defaults().

uint32 tick = 0

Definition at line 70 of file client.c.

Referenced by animate_inventory(), animate_look(), do_timeout(), and TickCmd().

char VERSION_INFO[256]
int want_skill_exp = 0

Definition at line 67 of file client.c.

Referenced by init_windows(), negotiate_connection(), and parse_args().