Crossfire Client, Branch  R11627
Defines | Functions | Variables
newsocket.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include <errno.h>
#include <client.h>
#include <newclient.h>
#include <script.h>
Include dependency graph for newsocket.c:

Go to the source code of this file.

Defines

#define llevDebug   LOG_DEBUG
#define llevError   LOG_ERROR

Functions

int cs_print_string (int fd, const char *str,...)
char GetChar_String (const unsigned char *data)
sint64 GetInt64_String (const unsigned char *data)
int GetInt_String (const unsigned char *data)
short GetShort_String (const unsigned char *data)
void SockList_AddChar (SockList *sl, char c)
void SockList_AddInt (SockList *sl, uint32 data)
void SockList_AddShort (SockList *sl, uint16 data)
void SockList_AddString (SockList *sl, const char *str)
void SockList_Init (SockList *sl, uint8 *buf)
int SockList_ReadPacket (int fd, SockList *sl, int len)
int SockList_Send (SockList *sl, int fd)
static int write_socket (int fd, const unsigned char *buf, int len)

Variables

const char *const rcsid_common_newsocket_c = "$Id: newsocket.c 9428 2008-07-08 06:31:53Z mwedel $"

Define Documentation

#define llevDebug   LOG_DEBUG

Definition at line 53 of file newsocket.c.

Referenced by SockList_ReadPacket().

#define llevError   LOG_ERROR

Definition at line 54 of file newsocket.c.

Referenced by SockList_ReadPacket(), and write_socket().


Function Documentation

int cs_print_string ( int  fd,
const char *  str,
  ... 
)
char GetChar_String ( const unsigned char *  data)

Definition at line 136 of file newsocket.c.

Referenced by AddspellCmd(), ExtSmooth(), MapExtendedCmd(), and UpdspellCmd().

Here is the caller graph for this function:

sint64 GetInt64_String ( const unsigned char *  data)

Definition at line 149 of file newsocket.c.

Referenced by get_exp_info(), script_watch(), and StatsCmd().

Here is the caller graph for this function:

int GetInt_String ( const unsigned char *  data)
short GetShort_String ( const unsigned char *  data)
void SockList_AddChar ( SockList sl,
char  c 
)

Definition at line 97 of file newsocket.c.

References SockList::buf, and SockList::len.

Referenced by inscribe_magical_scroll(), script_process_cmd(), and toggle_locked().

Here is the caller graph for this function:

void SockList_AddInt ( SockList sl,
uint32  data 
)

Definition at line 109 of file newsocket.c.

References SockList::buf, and SockList::len.

Referenced by inscribe_magical_scroll(), script_process_cmd(), send_command(), send_mark_obj(), and toggle_locked().

Here is the caller graph for this function:

void SockList_AddShort ( SockList sl,
uint16  data 
)

Definition at line 102 of file newsocket.c.

References SockList::buf, and SockList::len.

Referenced by send_command().

Here is the caller graph for this function:

void SockList_AddString ( SockList sl,
const char *  str 
)

Definition at line 117 of file newsocket.c.

References SockList::buf, SockList::len, and MAX_BUF.

Referenced by inscribe_magical_scroll(), script_process_cmd(), send_command(), send_mark_obj(), and toggle_locked().

Here is the caller graph for this function:

void SockList_Init ( SockList sl,
uint8 buf 
)

Definition at line 91 of file newsocket.c.

References SockList::buf, and SockList::len.

Referenced by cs_print_string(), inscribe_magical_scroll(), script_process_cmd(), send_command(), send_mark_obj(), and toggle_locked().

Here is the caller graph for this function:

int SockList_ReadPacket ( int  fd,
SockList sl,
int  len 
)

Definition at line 173 of file newsocket.c.

References SockList::buf, cst_lst, cst_tot, CS_Stats::ibytes, SockList::len, llevDebug, llevError, and LOG().

Referenced by DoClient().

Here is the call graph for this function:

Here is the caller graph for this function:

int SockList_Send ( SockList sl,
int  fd 
)

Definition at line 127 of file newsocket.c.

References SockList::buf, SockList::len, and write_socket().

Referenced by cs_print_string(), inscribe_magical_scroll(), script_process_cmd(), send_command(), send_mark_obj(), and toggle_locked().

Here is the call graph for this function:

Here is the caller graph for this function:

static int write_socket ( int  fd,
const unsigned char *  buf,
int  len 
) [static]

Definition at line 60 of file newsocket.c.

References llevError, and LOG().

Referenced by SockList_Send().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const char* const rcsid_common_newsocket_c = "$Id: newsocket.c 9428 2008-07-08 06:31:53Z mwedel $"

Definition at line 1 of file newsocket.c.