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

Conversation

VReaperV
Copy link
Contributor

@VReaperV VReaperV commented May 4, 2024

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.

This allows for more entities on the map, and brings the soft limit on the amount of buildings from ~250 to ~2k.

Tested with https://users.unvanquished.net/~sweet/layouts/spacetracks/humanpve1.dat (layout for map spacetracks): doesn't crash anymore, the game loads fine.

I'm getting a stack overflow when trying to connect to a server for some reason though.

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.
@@ -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.

@VReaperV
Copy link
Contributor Author

VReaperV commented Nov 9, 2024

Proper fix is in #1427.

@VReaperV VReaperV closed this Nov 9, 2024
@VReaperV VReaperV deleted the max-packet-size-increase branch November 18, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants