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

Method SNetReceiveMessage

SourceX/dvlnet/base.cpp:99–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99bool base::SNetReceiveMessage(int *sender, char **data, int *size)
100{
101 poll();
102 if (message_queue.empty())
103 return false;
104 message_last = message_queue.front();
105 message_queue.pop_front();
106 *sender = message_last.sender;
107 *size = message_last.payload.size();
108 *data = reinterpret_cast<char *>(message_last.payload.data());
109 return true;
110}
111
112bool base::SNetSendMessage(int playerID, void *data, unsigned int size)
113{

Callers 1

SNetReceiveMessageFunction · 0.45

Calls 5

frontMethod · 0.80
pop_frontMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected