Codechange: allow different limits in packet sizes

This commit is contained in:
Rubidium
2021-04-18 14:42:06 +02:00
committed by rubidium42
parent 97288bc286
commit 8b302761d4
4 changed files with 23 additions and 14 deletions

View File

@@ -119,7 +119,8 @@ void NetworkUDPSocketHandler::ReceivePackets()
struct sockaddr_storage client_addr;
memset(&client_addr, 0, sizeof(client_addr));
Packet p(this, SEND_MTU);
/* The limit is SEND_MTU, but also allocate that much as we need to read the whole packet in one go. */
Packet p(this, SEND_MTU, SEND_MTU);
socklen_t client_len = sizeof(client_addr);
/* Try to receive anything */