… | |
… | |
180 | iw cmd_ev; void cmd_cb (iw &w); |
180 | iw cmd_ev; void cmd_cb (iw &w); |
181 | iow socket_ev; void socket_cb (iow &w, int got); |
181 | iow socket_ev; void socket_cb (iow &w, int got); |
182 | |
182 | |
183 | std::deque< command, slice_allocator<command> > cmd_queue; |
183 | std::deque< command, slice_allocator<command> > cmd_queue; |
184 | |
184 | |
185 | // those should probably be client methods |
185 | // resets movement state |
186 | bool may_execute (const packet_type *pkt) const; |
186 | bool may_execute (const packet_type *pkt) const; |
187 | void execute (const packet_type *pkt, char *data, int datalen); |
187 | void execute (const packet_type *pkt, char *data, int datalen); |
188 | |
188 | |
189 | void queue_command (packet_type *handler, char *data, int datalen); |
189 | void queue_command (packet_type *handler, char *data, int datalen); |
190 | bool handle_command (); |
190 | bool handle_command (); |
|
|
191 | void reset_state (); |
191 | |
192 | |
192 | bool handle_packet (); |
193 | bool handle_packet (); |
193 | int next_packet (); // returns length of packet or 0 |
194 | int next_packet (); // returns length of packet or 0 |
194 | void skip_packet (int len); // we have processed the packet, skip it |
195 | void skip_packet (int len); // we have processed the packet, skip it |
195 | |
196 | |