ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/newserver.h
(Generate patch)

Comparing deliantra/server/include/newserver.h (file contents):
Revision 1.16 by root, Wed Dec 13 18:08:01 2006 UTC vs.
Revision 1.17 by root, Thu Dec 14 00:01:35 2006 UTC

100}; 100};
101 101
102/* how many times we are allowed to give the wrong password before being kicked. */ 102/* how many times we are allowed to give the wrong password before being kicked. */
103# define MAX_PASSWORD_FAILURES 5 103# define MAX_PASSWORD_FAILURES 5
104 104
105ACC_CLASS (player_TODO) // should become player when newsocket is a baseclass of player 105ACC_CLASS (client_socket) // should become player when newsocket is a baseclass of player
106struct NewSocket 106struct NewSocket : zero_initialised
107{ 107{
108 enum Sock_Status status; 108 enum Sock_Status status;
109 int ACC (RW, fd); 109 int ACC (RW, fd);
110 unsigned int inbuf_len; // number of bytes valid in inbuf
110 struct Map lastmap; 111 struct Map lastmap;
111 size_t faces_sent_len; /* This is the number of elements allocated in faces_sent[] */ 112 size_t faces_sent_len; /* This is the number of elements allocated in faces_sent[] */
112 uint8 *faces_sent; /* This is a bitmap on sent face status */ 113 uint8 *faces_sent; /* This is a bitmap on sent face status */
113 uint8 anims_sent[MAXANIMNUM]; 114 uint8 anims_sent[MAXANIMNUM];
114 struct statsinfo stats; 115 struct statsinfo stats;
115 /* If we get an incomplete packet, this is used to hold the data. */ 116
116 SockList inbuf;
117 char *ACC (RW, host); /* Which host it is connected from (ip address) */ 117 char *ACC (RW, host); /* Which host it is connected from (ip address) */
118 uint8 ACC (RW, password_fails); /* how many times the player has failed to give the right password */ 118 uint8 ACC (RW, password_fails); /* how many times the player has failed to give the right password */
119 Buffer outputbuffer; /* For undeliverable data */ 119 Buffer outputbuffer; /* For undeliverable data */
120 uint32 ACC (RO, facecache):1; /* If true, client is caching images */ 120 uint32 ACC (RO, facecache):1; /* If true, client is caching images */
121 uint32 ACC (RO, sent_scroll):1; 121 uint32 ACC (RO, sent_scroll):1;
147 uint8 ACC (RW, faceset); /* Set the client is using, default 0 */ 147 uint8 ACC (RW, faceset); /* Set the client is using, default 0 */
148 148
149 maptile *ACC (RW, current_map); // CF+ last/current player map 149 maptile *ACC (RW, current_map); // CF+ last/current player map
150 int ACC (RW, current_x), ACC (RW, current_y); // CF+ last/current map position 150 int ACC (RW, current_x), ACC (RW, current_y); // CF+ last/current map position
151 char ACC (RW, client)[64]; // CF+ client name/version 151 char ACC (RW, client)[64]; // CF+ client name/version
152
153 /* If we get an incomplete packet, this is used to hold the data. */
154 uint8 inbuf[MAXSOCKBUF];
155
156 int read_packet (); // returns length of packet or 0
157 void skip_packet (int len); // we have processed the packet, skip it
152}; 158};
153 159
154#define CLIENT_SUPPORT_READABLES(__sockPtr,__type)\ 160#define CLIENT_SUPPORT_READABLES(__sockPtr,__type)\
155 ( ((__type)>0) &&\ 161 ( ((__type)>0) &&\
156 ((__sockPtr)->has_readable_type) && \ 162 ((__sockPtr)->has_readable_type) && \

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines