Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Increase max network packet sizes #1116

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/engine/qcommon/net_chan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't just make the size of the real packet arbitrarily large. Some people suggest the current value is good for Ethernet. And supposedly a packet this large would be immediately rejected by any of our supported operating systems. Finally Cloudflare says that sending any packets larger than 1500 is likely to be broken.


static const int FRAGMENT_SIZE = ( MAX_PACKETLEN - 100 );

Expand Down
2 changes: 1 addition & 1 deletion src/engine/qcommon/qcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down