Skip to content

WIP: Increase max network packet sizes#1116

Closed
VReaperV wants to merge 1 commit intoDaemonEngine:masterfrom
VReaperV:max-packet-size-increase
Closed

WIP: Increase max network packet sizes#1116
VReaperV wants to merge 1 commit intoDaemonEngine:masterfrom
VReaperV:max-packet-size-increase

Conversation

@VReaperV
Copy link
Copy Markdown
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.
*/

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
Copy Markdown
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
Copy Markdown
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