MCPcopy Create free account
hub / github.com/assaultcube/AC / queue

Method queue

source/src/packetqueue.cpp:15–19  ·  view source on GitHub ↗

adds packet to log buffer

Source from the content-addressed store, hash-verified

13
14// adds packet to log buffer
15void 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
22bool packetqueue::flushtolog(const char *logfile)

Callers 1

gets2cFunction · 0.80

Calls 5

enet_packet_destroyFunction · 0.85
maxsizeMethod · 0.80
lengthMethod · 0.45
removeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected