v0.2.2: updated Lidgren, railgun shells can be bought, autorestart server, netstats, tutorial moloch spawning in a wall fix, misc error checks
This commit is contained in:
@@ -24,6 +24,11 @@ namespace Lidgren.Network
|
||||
|
||||
internal int m_currentMTU;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current MTU in bytes. If PeerConfiguration.AutoExpandMTU is false, this will be PeerConfiguration.MaximumTransmissionUnit.
|
||||
/// </summary>
|
||||
public int CurrentMTU { get { return m_currentMTU; } }
|
||||
|
||||
internal void InitExpandMTU(double now)
|
||||
{
|
||||
m_lastSentMTUAttemptTime = now + m_peerConfiguration.m_expandMTUFrequency + 1.5f + m_averageRoundtripTime; // wait a tiny bit before starting to expand mtu
|
||||
@@ -128,6 +133,7 @@ namespace Lidgren.Network
|
||||
m_lastSentMTUAttemptTime = now;
|
||||
|
||||
m_statistics.PacketSent(len, 1);
|
||||
m_peer.Recycle(om);
|
||||
}
|
||||
|
||||
private void FinalizeMTU(int size)
|
||||
@@ -149,8 +155,9 @@ namespace Lidgren.Network
|
||||
int len = om.Encode(m_peer.m_sendBuffer, 0, 0);
|
||||
bool connectionReset;
|
||||
m_peer.SendPacket(len, m_remoteEndPoint, 1, out connectionReset);
|
||||
m_peer.Recycle(om);
|
||||
|
||||
// m_peer.LogDebug("Received MTU expand request for " + size + " bytes");
|
||||
//m_peer.LogDebug("Received MTU expand request for " + size + " bytes");
|
||||
|
||||
m_statistics.PacketSent(len, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user