adds packet to log buffer
| 13 | |
| 14 | // adds packet to log buffer |
| 15 | void packetqueue::queue(ENetPacket *p) |
| 16 | { |
| 17 | if(packets.length() >= packets.maxsize()) enet_packet_destroy(packets.remove()); |
| 18 | packets.add(p); |
| 19 | } |
| 20 | |
| 21 | // writes all currently queued packets to disk and clears the queue |
| 22 | bool packetqueue::flushtolog(const char *logfile) |