add a estimator of client ping time, and painfully make it visible in show

connections console command
This commit is contained in:
UbitUmarov
2014-08-14 20:41:36 +01:00
parent d64fb216d2
commit 8c657e4837
8 changed files with 52 additions and 6 deletions

View File

@@ -163,6 +163,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private int m_maxRTO = 60000;
public bool m_deliverPackets = true;
public int m_lastStartpingTimeMS;
public int m_pingMS;
public int PingTimeMS
{
get
{
if (m_pingMS < 20)
return 20;
if(m_pingMS > 2000)
return 2000;
return m_pingMS;
}
}
/// <summary>
/// This is the percentage of the udp texture queue to add to the task queue since
/// textures are now generally handled through http.
@@ -225,6 +240,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Initialize this to a sane value to prevent early disconnects
TickLastPacketReceived = Environment.TickCount & Int32.MaxValue;
m_pingMS = (int)(3.0 * server.TickCountResolution); // so filter doesnt start at 0;
}
/// <summary>