1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 07:06:30 +09:00

Crude Path MTU detection added

This commit is contained in:
lidgren
2010-12-12 19:07:55 +00:00
parent 55cdf75c5f
commit 772d80835b
12 changed files with 336 additions and 10 deletions

View File

@@ -33,8 +33,9 @@ namespace Lidgren.Network
// create fragmentation specifics
int totalBytes = msg.LengthBytes;
int mtu = m_configuration.MaximumTransmissionUnit;
// determine minimum mtu for all recipients
int mtu = GetMTU(recipients);
int bytesPerChunk = NetFragmentationHelper.GetBestChunkSize(group, totalBytes, mtu);
int numChunks = totalBytes / bytesPerChunk;