aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-01 17:53:28 -0700
committerJohn Hurliman2009-10-01 17:53:28 -0700
commitaaf8fbcef910fb43414f0124d41c032a57b8e4b8 (patch)
treeed0b278d424b983f8d8edfb7dc0cda8e2eb2449f /OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
parent* Rewrote LLImageManager to use a real priority queue and hold minimal state (diff)
parentAdd a method to determine the count of packets in a throttle (diff)
downloadopensim-SC-aaf8fbcef910fb43414f0124d41c032a57b8e4b8.zip
opensim-SC-aaf8fbcef910fb43414f0124d41c032a57b8e4b8.tar.gz
opensim-SC-aaf8fbcef910fb43414f0124d41c032a57b8e4b8.tar.bz2
opensim-SC-aaf8fbcef910fb43414f0124d41c032a57b8e4b8.tar.xz
Merge branch 'diva-textures-osgrid' of ssh://opensimulator.org/var/git/opensim into diva-textures-osgrid
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
index 67ece75..37f6ca7 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
@@ -129,6 +129,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
129 // 129 //
130 public event PacketStats OnPacketStats; 130 public event PacketStats OnPacketStats;
131 public event PacketDrop OnPacketDrop; 131 public event PacketDrop OnPacketDrop;
132 public event QueueEmpty OnQueueEmpty;
132 133
133 134
134 //private SynchronizeClientHandler m_SynchronizeClient = null; 135 //private SynchronizeClientHandler m_SynchronizeClient = null;
@@ -172,6 +173,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
172 173
173 m_PacketQueue = new LLPacketQueue(client.AgentId, userSettings); 174 m_PacketQueue = new LLPacketQueue(client.AgentId, userSettings);
174 175
176 m_PacketQueue.OnQueueEmpty += TriggerOnQueueEmpty;
177
175 m_AckTimer.Elapsed += AckTimerElapsed; 178 m_AckTimer.Elapsed += AckTimerElapsed;
176 m_AckTimer.Start(); 179 m_AckTimer.Start();
177 } 180 }
@@ -769,6 +772,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
769 handlerPacketDrop(packet, id); 772 handlerPacketDrop(packet, id);
770 } 773 }
771 774
775 private void TriggerOnQueueEmpty(ThrottleOutPacketType queue)
776 {
777 QueueEmpty handlerQueueEmpty = OnQueueEmpty;
778
779 if (handlerQueueEmpty == null)
780 return;
781
782 handlerQueueEmpty(queue);
783 }
784
772 // Convert the packet to bytes and stuff it onto the send queue 785 // Convert the packet to bytes and stuff it onto the send queue
773 // 786 //
774 public void ProcessOutPacket(LLQueItem item) 787 public void ProcessOutPacket(LLQueItem item)
@@ -850,5 +863,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
850 m_PacketQueue.Close(); 863 m_PacketQueue.Close();
851 Thread.CurrentThread.Abort(); 864 Thread.CurrentThread.Abort();
852 } 865 }
866
867 public int GetQueueCount(ThrottleOutPacketType queue)
868 {
869 return m_PacketQueue.GetQueueCount(queue);
870 }
853 } 871 }
854} 872}