* Copied LocklessQueue.cs into OpenSim.Framework and added the .Count property and .Clear() method

* Changed the way the QueueEmpty callback is fired. It will be fired asynchronously as soon as an empty queue is detected (this can happen immediately following a dequeue), and will not be fired again until at least one packet is dequeued from that queue. This will give callbacks advanced notice of an empty queue and prevent callbacks from stacking up while the queue is empty
* Added LLUDPClient.IsConnected checks in several places to prevent unwanted network activity after a client disconnects
* Prevent LLClientView.Close() from being called twice every disconnect
* Removed the packet resend limit and improved the client timeout check
This commit is contained in:
John Hurliman
2009-10-13 18:56:54 -07:00
parent dc11643c00
commit e8c1e69a0d
7 changed files with 242 additions and 94 deletions

View File

@@ -102,6 +102,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
return false;
}
/// <summary>
/// Removes all elements from the collection
/// </summary>
public void Clear()
{
lock (SyncRoot)
packets.Clear();
}
/// <summary>
/// Gets the packet with the lowest sequence number
/// </summary>