MCPcopy Index your code
hub / github.com/assaultcube/AC / flushmasterinput

Function flushmasterinput

source/src/serverms.cpp:146–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void flushmasterinput()
147{
148 if(masterin.length() >= masterin.capacity())
149 masterin.reserve(4096);
150
151 ENetBuffer buf;
152 buf.data = masterin.getbuf() + masterin.length();
153 buf.dataLength = masterin.capacity() - masterin.length();
154 int recv = enet_socket_receive(mastersock, NULL, &buf, 1);
155 if(recv > 0)
156 {
157 masterin.advance(recv);
158 processmasterinput();
159 }
160 else disconnectmaster();
161}
162
163extern int totalclients;
164

Callers 1

servermsFunction · 0.85

Calls 8

disconnectmasterFunction · 0.85
capacityMethod · 0.80
reserveMethod · 0.80
advanceMethod · 0.80
processmasterinputFunction · 0.70
enet_socket_receiveFunction · 0.50
lengthMethod · 0.45
getbufMethod · 0.45

Tested by

no test coverage detected