Feature: encrypt the connection between game server and client

This commit is contained in:
Rubidium
2024-03-14 21:36:28 +01:00
committed by rubidium42
parent d26629c15b
commit 1cf8799810
12 changed files with 143 additions and 33 deletions

View File

@@ -137,7 +137,10 @@ void NetworkUDPSocketHandler::ReceivePackets()
Debug(net, 1, "Received a packet with mismatching size from {}", address.GetAddressAsString());
continue;
}
p.PrepareToRead();
if (!p.PrepareToRead()) {
Debug(net, 1, "Invalid packet received (too small / decryption error)");
continue;
}
/* Handle the packet */
this->HandleUDPPacket(p, address);