Crossfire Server, Branches 1.12  R18729
socket_struct Struct Reference

#include <newserver.h>

+ Collaboration diagram for socket_struct:

Data Fields

uint8 anims_sent [MAXANIMNUM]
 
uint32 can_write:1
 
uint32 cs_version
 
uint32 darkness:1
 
uint32 facecache:1
 
uint8faces_sent
 
size_t faces_sent_len
 
uint8 faceset
 
int fd
 
uint32 has_readable_type:1
 
char * host
 
SockList inbuf
 
uint32 is_bot:1
 
struct Map lastmap
 
uint16 look_position
 
sint8 map_scroll_x
 
sint8 map_scroll_y
 
uint8 mapx
 
uint8 mapy
 
uint32 monitor_spells:1
 
uint32 newmapcmd:1
 
uint8 num_look_objects
 
buffer_struct outputbuffer
 
uint8 password_fails
 
uint32 sc_version
 
uint32 sound
 
sint8 sounds_this_tick
 
struct statsinfo stats
 
enum Sock_Status status
 
uint32 supported_readables
 
uint32 tick:1
 
uint32 update_look:1
 
uint32 want_pickup:1
 

Detailed Description

Socket structure, represents a client-server connection.

Definition at line 115 of file newserver.h.

Field Documentation

uint8 socket_struct::anims_sent[MAXANIMNUM]

What animations we sent.

Definition at line 122 of file newserver.h.

Referenced by add_object_to_socklist(), esrv_send_animation(), init_connection(), and map2_add_ob().

uint32 socket_struct::can_write

Can we write to this socket?

Definition at line 132 of file newserver.h.

Referenced by do_server(), init_connection(), write_socket_buffer(), and Write_To_Socket().

uint32 socket_struct::cs_version

Definition at line 141 of file newserver.h.

Referenced by add_me_cmd(), and version_cmd().

uint32 socket_struct::darkness

True if client wants darkness information.

Definition at line 130 of file newserver.h.

Referenced by draw_client_map2(), init_connection(), and set_up_cmd().

uint32 socket_struct::facecache

If true, client is caching images.

Definition at line 128 of file newserver.h.

Referenced by esrv_send_face(), init_connection(), set_face_mode_cmd(), and set_up_cmd().

size_t socket_struct::faces_sent_len

This is the number of elements allocated in faces_sent[].

Definition at line 120 of file newserver.h.

Referenced by do_server(), and init_connection().

uint8 socket_struct::faceset

Set the client is using, default 0.

Definition at line 144 of file newserver.h.

Referenced by esrv_send_face(), init_connection(), send_image_sums(), and set_up_cmd().

uint32 socket_struct::has_readable_type

If true client accept additional text information used to arrange text in books, scrolls, or scripted dialogs.

Definition at line 133 of file newserver.h.

Referenced by init_connection(), and set_up_cmd().

SockList socket_struct::inbuf

If we get an incomplete packet, this is used to hold the data.

Definition at line 124 of file newserver.h.

Referenced by add_player(), free_newsocket(), handle_client(), and init_connection().

uint32 socket_struct::is_bot

Client shouldn't be reported to metaserver.

Definition at line 137 of file newserver.h.

Referenced by get_who_escape_code_value(), init_connection(), list_players(), metaserver_update(), and set_up_cmd().

struct Map socket_struct::lastmap
uint16 socket_struct::look_position
sint8 socket_struct::map_scroll_x

Definition at line 119 of file newserver.h.

Referenced by draw_client_map2(), esrv_map_scroll(), init_connection(), and map_newmap_cmd().

sint8 socket_struct::map_scroll_y

Definition at line 119 of file newserver.h.

Referenced by draw_client_map2(), esrv_map_scroll(), init_connection(), and map_newmap_cmd().

uint32 socket_struct::monitor_spells

Client wishes to be informed when their spell list changes.

Definition at line 135 of file newserver.h.

Referenced by esrv_add_spells(), esrv_remove_spell(), esrv_update_spells(), esrv_update_stats(), get_player(), init_connection(), and set_up_cmd().

uint32 socket_struct::newmapcmd

Send newmap command when entering new map SMACFIGGEN.

Definition at line 129 of file newserver.h.

Referenced by init_connection(), map_newmap_cmd(), and set_up_cmd().

uint8 socket_struct::num_look_objects

The maximum number of objects to show on the ground view; this number includes the prev/next group fake items. Can be set through "num_look_objects" setup option; defaults to DEFAULT_NUM_LOOK_OBJECTS.

Definition at line 149 of file newserver.h.

Referenced by esrv_draw_look(), init_connection(), and set_up_cmd().

buffer_struct socket_struct::outputbuffer

For undeliverable data.

Definition at line 126 of file newserver.h.

Referenced by add_to_buffer(), init_connection(), and write_socket_buffer().

uint8 socket_struct::password_fails

How many times the player has failed to give the right password.

Definition at line 127 of file newserver.h.

Referenced by init_connection(), and wrong_password().

uint32 socket_struct::sc_version

Versions of the client.

Definition at line 141 of file newserver.h.

Referenced by add_me_cmd(), esrv_update_stats(), and version_cmd().

uint32 socket_struct::sound

Client sound mode.

Definition at line 139 of file newserver.h.

Referenced by command_sound(), init_connection(), play_sound_player_only(), send_background_music(), and set_up_cmd().

sint8 socket_struct::sounds_this_tick

Number of sounds sent this tick.

Definition at line 148 of file newserver.h.

Referenced by play_sound_player_only(), and process_players1().

struct statsinfo socket_struct::stats

Definition at line 123 of file newserver.h.

Referenced by esrv_update_stats(), free_newsocket(), and init_connection().

uint32 socket_struct::supported_readables

Each bit is a readable supported by client.

Definition at line 140 of file newserver.h.

Referenced by init_connection(), and toggle_extended_text_cmd().

uint32 socket_struct::tick

Client wishes to get tick commands.

Definition at line 136 of file newserver.h.

Referenced by do_server(), init_connection(), and set_up_cmd().

uint32 socket_struct::want_pickup

Client wants pickup information when logging in.

Definition at line 138 of file newserver.h.

Referenced by esrv_send_pickup(), init_connection(), and set_up_cmd().


The documentation for this struct was generated from the following file: