From b51c50ef8e31227f52e2bf0aa60bdd7f0765e02c Mon Sep 17 00:00:00 2001 From: VReaperV Date: Sat, 4 May 2024 13:23:44 +0300 Subject: [PATCH] Increase max network packet sizes Increase the maximum length of a network message from 32768 bytes to 262144. Also increased max packet length from 1400 bytes to 265000 bytes, because packet fragmenting is not working correctly with larger message sizes. --- src/engine/qcommon/net_chan.cpp | 2 +- src/engine/qcommon/qcommon.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/qcommon/net_chan.cpp b/src/engine/qcommon/net_chan.cpp index 76a86be705..1eef5cc3dd 100644 --- a/src/engine/qcommon/net_chan.cpp +++ b/src/engine/qcommon/net_chan.cpp @@ -59,7 +59,7 @@ to the new value before sending out any replies. */ -static const int MAX_PACKETLEN = 1400; // max size of a network packet +static const int MAX_PACKETLEN = 265000; // max size of a network packet static const int FRAGMENT_SIZE = ( MAX_PACKETLEN - 100 ); diff --git a/src/engine/qcommon/qcommon.h b/src/engine/qcommon/qcommon.h index e8df255767..97a5a87f7e 100644 --- a/src/engine/qcommon/qcommon.h +++ b/src/engine/qcommon/qcommon.h @@ -166,7 +166,7 @@ void NET_LeaveMulticast6(); void NET_Sleep( int msec ); //----(SA) increased for larger submodel entity counts -#define MAX_MSGLEN 32768 // max length of a message, which may +#define MAX_MSGLEN 262144 // max length of a message, which may //#define MAX_MSGLEN 16384 // max length of a message, which may // be fragmented into multiple packets #define MAX_DOWNLOAD_WINDOW 8 // max of eight download frames