Codechange: differentiate between UDP, TCP and compatibility MTU values

This commit is contained in:
Rubidium
2021-04-18 14:49:39 +02:00
committed by rubidium42
parent 8b302761d4
commit d6000c2ec5
8 changed files with 20 additions and 18 deletions

View File

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