MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / queuePacket

Method queuePacket

src/openrct2/network/NetworkConnection.cpp:189–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187 }
188
189 void Connection::queuePacket(const Packet& packet, bool front)
190 {
191 if (authStatus == Auth::ok || !packet.commandRequiresAuth())
192 {
193 const auto payload = serializePacket(_isLegacyProtocol, packet);
194 if (front)
195 {
196 _outboundBuffer.insert(_outboundBuffer.begin(), payload.begin(), payload.end());
197 }
198 else
199 {
200 _outboundBuffer.insert(_outboundBuffer.end(), payload.begin(), payload.end());
201 }
202
203 recordPacketStats(packet, true);
204 }
205 }
206
207 void Connection::disconnect() noexcept
208 {

Callers 15

SendPacketToClientsMethod · 0.80
Client_Send_TOKENMethod · 0.80
Client_Send_AUTHMethod · 0.80
ServerSendTokenMethod · 0.80
ServerSendObjectsListMethod · 0.80
ServerSendScriptsMethod · 0.80
Client_Send_HEARTBEATMethod · 0.80
ServerSendAuthMethod · 0.80
ServerSendMapMethod · 0.80
Client_Send_CHATMethod · 0.80

Calls 4

serializePacketFunction · 0.85
commandRequiresAuthMethod · 0.80
endMethod · 0.65
beginMethod · 0.45

Tested by

no test coverage detected