MCPcopy Create free account
hub / github.com/diasurgical/devilution / packet_ready

Method packet_ready

SourceX/dvlnet/frame_queue.cpp:45–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45bool frame_queue::packet_ready()
46{
47 if (!nextsize) {
48 if (size() < sizeof(framesize_t))
49 return false;
50 auto szbuf = read(sizeof(framesize_t));
51 std::memcpy(&nextsize, &szbuf[0], sizeof(framesize_t));
52 if (!nextsize)
53 throw frame_queue_exception();
54 }
55 if (size() >= nextsize)
56 return true;
57 else
58 return false;
59}
60
61buffer_t frame_queue::read_packet()
62{

Callers 2

handle_recvMethod · 0.80
handle_recvMethod · 0.80

Calls 3

sizeFunction · 0.85
readFunction · 0.85

Tested by

no test coverage detected