| 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 | { |
no test coverage detected