Committing Jim's optimization to replace the 20ms sleep in outgoing packet handling with an interruptible wait handle

This commit is contained in:
John Hurliman
2009-10-21 00:18:35 -07:00
parent 45dc4e0a54
commit cde47c2b3d
4 changed files with 120 additions and 49 deletions

View File

@@ -97,6 +97,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
/// <summary>
/// The speed limit of this bucket in bytes per millisecond
/// </summary>
public int DripPerMS
{
get { return tokensPerMS; }
}
/// <summary>
/// The number of bytes that can be sent at this moment. This is the
/// current number of tokens in the bucket
@@ -106,11 +114,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// </summary>
public int Content
{
get
{
Drip();
return content;
}
get { return content; }
}
#endregion Properties
@@ -182,7 +186,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// call to Drip
/// </summary>
/// <returns>True if tokens were added to the bucket, otherwise false</returns>
private bool Drip()
public bool Drip()
{
if (tokensPerMS == 0)
{