* Added more comments

* Tweaked the esoteric throttler parameters again.
afrisby
Teravus Ovares 2007-11-22 23:56:44 +00:00
parent 01cd8014da
commit 2db19b7d65
2 changed files with 10 additions and 7 deletions

View File

@ -231,7 +231,7 @@ namespace OpenSim.Region.ClientStack
switch (throttlePacketType)
{
case ThrottleOutPacketType.Resend:
if (ResendthrottleSentPeriod <= ResendthrottleOutbound && ResendOutgoingPacketQueue.Count == 0)
if (ResendthrottleSentPeriod <= ((int)(ResendthrottleOutbound / throttleTimeDivisor)) && ResendOutgoingPacketQueue.Count == 0)
{
throttleSentPeriod += item.Packet.ToBytes().Length;
ResendthrottleSentPeriod += item.Packet.ToBytes().Length;
@ -243,7 +243,7 @@ namespace OpenSim.Region.ClientStack
}
break;
case ThrottleOutPacketType.Texture:
if (TexturethrottleSentPeriod <= TexturethrottleOutbound && TextureOutgoingPacketQueue.Count == 0)
if (TexturethrottleSentPeriod <= ((int)(TexturethrottleOutbound / throttleTimeDivisor)) && TextureOutgoingPacketQueue.Count == 0)
{
throttleSentPeriod += item.Packet.ToBytes().Length;
TexturethrottleSentPeriod += item.Packet.ToBytes().Length;
@ -255,7 +255,7 @@ namespace OpenSim.Region.ClientStack
}
break;
case ThrottleOutPacketType.Task:
if (TaskthrottleSentPeriod <= TaskthrottleOutbound && TaskOutgoingPacketQueue.Count == 0)
if (TaskthrottleSentPeriod <= ((int)(TexturethrottleOutbound / throttleTimeDivisor)) && TaskOutgoingPacketQueue.Count == 0)
{
throttleSentPeriod += item.Packet.ToBytes().Length;
TaskthrottleSentPeriod += item.Packet.ToBytes().Length;
@ -267,7 +267,7 @@ namespace OpenSim.Region.ClientStack
}
break;
case ThrottleOutPacketType.Land:
if (LandthrottleSentPeriod <= LandthrottleOutbound && LandOutgoingPacketQueue.Count == 0)
if (LandthrottleSentPeriod <= ((int)(LandthrottleOutbound / throttleTimeDivisor)) && LandOutgoingPacketQueue.Count == 0)
{
throttleSentPeriod += item.Packet.ToBytes().Length;
LandthrottleSentPeriod += item.Packet.ToBytes().Length;
@ -279,7 +279,7 @@ namespace OpenSim.Region.ClientStack
}
break;
case ThrottleOutPacketType.Asset:
if (AssetthrottleSentPeriod <= AssetthrottleOutbound && AssetOutgoingPacketQueue.Count == 0)
if (AssetthrottleSentPeriod <= ((int)(AssetthrottleOutbound / throttleTimeDivisor)) && AssetOutgoingPacketQueue.Count == 0)
{
throttleSentPeriod += item.Packet.ToBytes().Length;
AssetthrottleSentPeriod += item.Packet.ToBytes().Length;
@ -291,7 +291,7 @@ namespace OpenSim.Region.ClientStack
}
break;
case ThrottleOutPacketType.Cloud:
if (CloudthrottleSentPeriod <= CloudthrottleOutbound && CloudOutgoingPacketQueue.Count == 0)
if (CloudthrottleSentPeriod <= ((int)(CloudthrottleOutbound / throttleTimeDivisor)) && CloudOutgoingPacketQueue.Count == 0)
{
throttleSentPeriod += item.Packet.ToBytes().Length;
CloudthrottleSentPeriod += item.Packet.ToBytes().Length;
@ -303,7 +303,7 @@ namespace OpenSim.Region.ClientStack
}
break;
case ThrottleOutPacketType.Wind:
if (WindthrottleSentPeriod <= WindthrottleOutbound && WindOutgoingPacketQueue.Count == 0)
if (WindthrottleSentPeriod <= ((int)(WindthrottleOutbound / throttleTimeDivisor)) && WindOutgoingPacketQueue.Count == 0)
{
throttleSentPeriod += item.Packet.ToBytes().Length;
WindthrottleSentPeriod += item.Packet.ToBytes().Length;

View File

@ -96,6 +96,9 @@ namespace OpenSim.Region.ClientStack
// TODO: Make this variable. Lower throttle on un-ack. Raise over time
// All throttle times and number of bytes are calculated by dividing by this value
// This value also determines how many times per throttletimems the timer will run
// If throttleimems is 1000 ms, then the timer will fire every 1000/7 milliseconds
private int throttleTimeDivisor = 7;
private int throttletimems = 1000;