… | |
… | |
149 | |
149 | |
150 | /* If we get an incomplete packet, this is used to hold the data. */ |
150 | /* If we get an incomplete packet, this is used to hold the data. */ |
151 | uint8 inbuf[MAXSOCKBUF]; |
151 | uint8 inbuf[MAXSOCKBUF]; |
152 | player *pl;//TODO should not be here, preferably |
152 | player *pl;//TODO should not be here, preferably |
153 | |
153 | |
|
|
154 | iow socket_ev; void socket_cb (iow &w, int got); |
|
|
155 | |
154 | client_socket (int fd, const char *from_ip); |
156 | client_socket (int fd, const char *from_ip); |
155 | ~client_socket (); |
157 | ~client_socket (); |
156 | |
158 | |
157 | int read_packet (); // returns length of packet or 0 |
159 | int read_packet (); // returns length of packet or 0 |
158 | void skip_packet (int len); // we have processed the packet, skip it |
160 | void skip_packet (int len); // we have processed the packet, skip it |