lsalzman / enet

ENet reliable UDP networking library
MIT License
2.66k stars 667 forks source link

Fix MTU negotiation on server side #222

Closed seragh closed 1 year ago

seragh commented 1 year ago

On connect the MTU sent by the client gets stored and sent back unchanged if within minimum and maximum of the protocol. Then on verify connect a test is done if the returned MTU is smaller than the current MTU and if so gets adjusted. So as long as the MTU is within boundaries only the client specified MTU is relevant.

This patch adds a check for smaller MTU on server side.