[1.2.0-exp.3] CommandSendSystem Should Use MaxMessageSize Parameter Instead of Hardcoded MTU

Newly introduced in Transport 2.1 is the maxMessageSize parameter found on NetworkSettings, a customizable max packet size for restricting the size of packets other than 1400 bytes what was previously hardcoded into NetworkParameterConstants.MTU.

Netcode’s CommandSendSystem does not yet recognize MaxMessageSize so changing this value will cause the send system to break.

Please change CommandSendSystem (specifically line 181) to instead use the MaxMessageSize parameter on the driver’s NetworkSettings.


Just in case anyone stumbles upon an error caused by reducing the max message size and googles it:

Failed to send a snapshot to a client with BeginSend error: -4!
3 Likes

this is good point! Thanks for the suggestion.

3 Likes

Can I add that there are several places in Netcode that use MTU constant that might need to be reviewed to look at MaxMessageSize. I’m sure you know this already ^^. FYI just in case.

9479149--1332892--upload_2023-11-18_12-39-2.png

4 Likes

Hey, we are on it. I will keep you updated about the progress

3 Likes