Crossfire Server, Trunk  R20513
Data Fields
socket_struct Struct Reference

Socket structure, represents a client-server connection. More...

#include <newserver.h>

Collaboration diagram for socket_struct:
Collaboration graph

Data Fields

Account_Characcount_chars
 Detailed information on characters on this account. More...
 
char * account_name
 Name of the account logged in on this socket. More...
 
uint8_t anims_sent [MAXANIMNUM]
 What animations we sent. More...
 
uint32_t can_write:1
 Can we write to this socket? More...
 
uint16_t container_position
 Start of container contents to send to client. More...
 
uint32_t cs_version
 
uint32_t darkness:1
 True if client wants darkness information. More...
 
uint32_t extended_stats:1
 Client wants base and maximum statistics information. More...
 
uint32_t facecache:1
 If true, client is caching images. More...
 
uint8_tfaces_sent
 This is a bitmap on sent face status. More...
 
size_t faces_sent_len
 This is the number of elements allocated in faces_sent[]. More...
 
uint8_t faceset
 Set the client is using, default 0. More...
 
int fd
 
bool heartbeat
 Client will send hearbeats. More...
 
char * host
 Which host it is connected from (ip address). More...
 
SockList inbuf
 If we get an incomplete packet, this is used to hold the data. More...
 
uint32_t is_bot:1
 Client shouldn't be reported to metaserver. More...
 
uint32_t last_tick
 Number of ticks since last communication. More...
 
struct Map lastmap
 
struct listen_infolisten
 
uint8_t login_method
 Login method this client is using. More...
 
uint16_t look_position
 Start of drawing of look window. More...
 
int8_t map_scroll_x
 
int8_t map_scroll_y
 
uint8_t mapx
 
uint8_t mapy
 How large a map the client wants. More...
 
uint32_t monitor_spells
 Client wishes to be informed when their spell list changes. More...
 
uint16_t notifications
 Notifications this client wants to get. More...
 
uint8_t num_look_objects
 The maximum number of objects to show on the ground view; this number includes the prev/next group fake items. More...
 
buffer_struct outputbuffer
 For undeliverable data. More...
 
uint8_t password_fails
 How many times the player has failed to give the right password. More...
 
uint32_t sc_version
 Versions of the client. More...
 
uint32_t sound
 Client sound mode. More...
 
int8_t sounds_this_tick
 Number of sounds sent this tick. More...
 
struct statsinfo stats
 
enum Sock_Status status
 
uint32_t tick:1
 Client wishes to get tick commands. More...
 
uint32_t update_inventory:1
 If true, we need to send the inventory list. More...
 
uint32_t update_look:1
 If true, we need to send the look window. More...
 
uint32_t want_pickup:1
 Client wants pickup information when logging in. More...
 

Detailed Description

Socket structure, represents a client-server connection.

Definition at line 99 of file newserver.h.

Field Documentation

Account_Char* socket_struct::account_chars

Detailed information on characters on this account.

Definition at line 139 of file newserver.h.

Referenced by account_add_player_cmd(), free_newsocket(), init_connection(), key_confirm_quit(), save_player(), and send_account_players().

char* socket_struct::account_name
uint8_t socket_struct::anims_sent[MAXANIMNUM]

What animations we sent.

Definition at line 107 of file newserver.h.

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

uint32_t socket_struct::can_write

Can we write to this socket?

Definition at line 117 of file newserver.h.

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

uint16_t socket_struct::container_position

Start of container contents to send to client.

Definition at line 127 of file newserver.h.

Referenced by apply_cmd(), apply_container(), esrv_send_inventory(), and init_connection().

uint32_t socket_struct::cs_version

Definition at line 125 of file newserver.h.

Referenced by add_me_cmd(), and version_cmd().

uint32_t socket_struct::darkness

True if client wants darkness information.

Definition at line 114 of file newserver.h.

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

uint32_t socket_struct::extended_stats

Client wants base and maximum statistics information.

Definition at line 121 of file newserver.h.

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

uint32_t socket_struct::facecache

If true, client is caching images.

Definition at line 113 of file newserver.h.

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

uint8_t* socket_struct::faces_sent
size_t socket_struct::faces_sent_len

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

Definition at line 105 of file newserver.h.

Referenced by init_connection(), and new_connection().

uint8_t socket_struct::faceset

Set the client is using, default 0.

Definition at line 129 of file newserver.h.

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

int socket_struct::fd
bool socket_struct::heartbeat

Client will send hearbeats.

Definition at line 124 of file newserver.h.

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

char* socket_struct::host
SockList socket_struct::inbuf

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

Definition at line 109 of file newserver.h.

Referenced by account_play_cmd(), free_newsocket(), handle_client(), init_connection(), and set_player_socket().

uint32_t socket_struct::is_bot

Client shouldn't be reported to metaserver.

Definition at line 119 of file newserver.h.

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

uint32_t socket_struct::last_tick

Number of ticks since last communication.

Definition at line 142 of file newserver.h.

Referenced by connection_alive(), do_server(), and handle_client().

struct Map socket_struct::lastmap
struct listen_info* socket_struct::listen
uint8_t socket_struct::login_method

Login method this client is using.

Definition at line 140 of file newserver.h.

Referenced by command_passwd(), create_player_cmd(), init_connection(), play_again(), receive_play_again(), and set_up_cmd().

uint16_t socket_struct::look_position
int8_t socket_struct::map_scroll_x

Definition at line 104 of file newserver.h.

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

int8_t socket_struct::map_scroll_y

Definition at line 104 of file newserver.h.

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

uint8_t socket_struct::mapx
uint8_t socket_struct::mapy
uint32_t socket_struct::monitor_spells

Client wishes to be informed when their spell list changes.

Definition at line 122 of file newserver.h.

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

uint16_t socket_struct::notifications

Notifications this client wants to get.

Definition at line 141 of file newserver.h.

Referenced by init_connection(), knowledge_get_or_create(), knowledge_send_known(), quest_send_initial_states(), quest_set_state(), and set_up_cmd().

uint8_t 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 134 of file newserver.h.

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

buffer_struct socket_struct::outputbuffer

For undeliverable data.

Definition at line 111 of file newserver.h.

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

uint8_t socket_struct::password_fails

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

Definition at line 112 of file newserver.h.

Referenced by init_connection(), and wrong_password().

uint32_t socket_struct::sc_version

Versions of the client.

Definition at line 125 of file newserver.h.

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

uint32_t socket_struct::sound

Client sound mode.

Definition at line 123 of file newserver.h.

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

int8_t socket_struct::sounds_this_tick

Number of sounds sent this tick.

Definition at line 133 of file newserver.h.

Referenced by init_connection(), play_sound_player_only(), and process_players1().

struct statsinfo socket_struct::stats

Definition at line 108 of file newserver.h.

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

enum Sock_Status socket_struct::status
uint32_t socket_struct::tick

Client wishes to get tick commands.

Definition at line 118 of file newserver.h.

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

uint32_t socket_struct::update_inventory

If true, we need to send the inventory list.

Definition at line 116 of file newserver.h.

Referenced by apply_cmd(), do_server(), esrv_del_item(), esrv_send_item(), and init_connection().

uint32_t socket_struct::update_look
uint32_t socket_struct::want_pickup

Client wants pickup information when logging in.

Definition at line 120 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: