Crossfire Client, Branch
R11627
|
#include <stdio.h>
#include <stdarg.h>
#include <errno.h>
#include <client.h>
#include <newclient.h>
#include <script.h>
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 $" |
Definition at line 53 of file newsocket.c.
Referenced by SockList_ReadPacket().
Definition at line 54 of file newsocket.c.
Referenced by SockList_ReadPacket(), and write_socket().
int cs_print_string | ( | int | fd, |
const char * | str, | ||
... | |||
) |
Definition at line 259 of file newsocket.c.
References SockList::buf, SockList::len, MAX_BUF, script_monitor_str(), SockList_Init(), and SockList_Send().
Referenced by applyconfig(), client_send_apply(), client_send_examine(), client_send_move(), command_take(), get_image_info(), look_at(), negotiate_connection(), on_drawingarea_map_configure_event(), read_config_window(), requestface(), script_process_cmd(), send_command(), send_reply(), SendAddMe(), SendSetFaceMode(), SendVersion(), and SetupCmd().
char GetChar_String | ( | const unsigned char * | data | ) |
Definition at line 136 of file newsocket.c.
Referenced by AddspellCmd(), ExtSmooth(), MapExtendedCmd(), and UpdspellCmd().
sint64 GetInt64_String | ( | const unsigned char * | data | ) |
Definition at line 149 of file newsocket.c.
Referenced by get_exp_info(), script_watch(), and StatsCmd().
int GetInt_String | ( | const unsigned char * | data | ) |
Definition at line 143 of file newsocket.c.
Referenced by AddspellCmd(), common_item_command(), CompleteCmd(), DeleteItem(), DeleteSpell(), Face2Cmd(), get_image_sums(), Image2Cmd(), PickupCmd(), PlayerCmd(), script_watch(), StatsCmd(), TickCmd(), UpdateItemCmd(), and UpdspellCmd().
short GetShort_String | ( | const unsigned char * | data | ) |
Definition at line 162 of file newsocket.c.
Referenced by AddspellCmd(), AnimCmd(), common_item_command(), CompleteCmd(), Face2Cmd(), get_exp_info(), get_image_sums(), Map2Cmd(), MapExtendedCmd(), script_watch(), SmoothCmd(), SoundCmd(), StatsCmd(), UpdateItemCmd(), and UpdspellCmd().
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().
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().
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().
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().
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().
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().
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().
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().
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.