aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
diff options
context:
space:
mode:
authorMelanie2009-10-02 19:53:42 +0100
committerMelanie2009-10-02 19:53:42 +0100
commit9eccea577716ee4331d30d519da389393b8606cd (patch)
tree2e3f1ad5892a7e1d1dc0155f1613adab8bcd2690 /OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
parentMerge branch 'master' into vehicles (diff)
parentMerge branch 'master' into diva-textures (diff)
downloadopensim-SC_OLD-9eccea577716ee4331d30d519da389393b8606cd.zip
opensim-SC_OLD-9eccea577716ee4331d30d519da389393b8606cd.tar.gz
opensim-SC_OLD-9eccea577716ee4331d30d519da389393b8606cd.tar.bz2
opensim-SC_OLD-9eccea577716ee4331d30d519da389393b8606cd.tar.xz
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs19
1 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
index eaf8f60..e98a360 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,13 +173,16 @@ 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 }
178 181
179 public void Stop() 182 public void Dispose()
180 { 183 {
181 m_AckTimer.Stop(); 184 m_AckTimer.Stop();
185 m_AckTimer.Close();
182 186
183 m_PacketQueue.Enqueue(null); 187 m_PacketQueue.Enqueue(null);
184 m_PacketQueue.Close(); 188 m_PacketQueue.Close();
@@ -768,6 +772,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
768 handlerPacketDrop(packet, id); 772 handlerPacketDrop(packet, id);
769 } 773 }
770 774
775 private void TriggerOnQueueEmpty(ThrottleOutPacketType queue)
776 {
777 QueueEmpty handlerQueueEmpty = OnQueueEmpty;
778
779 if (handlerQueueEmpty != null)
780 handlerQueueEmpty(queue);
781 }
782
771 // Convert the packet to bytes and stuff it onto the send queue 783 // Convert the packet to bytes and stuff it onto the send queue
772 // 784 //
773 public void ProcessOutPacket(LLQueItem item) 785 public void ProcessOutPacket(LLQueItem item)
@@ -849,5 +861,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
849 m_PacketQueue.Close(); 861 m_PacketQueue.Close();
850 Thread.CurrentThread.Abort(); 862 Thread.CurrentThread.Abort();
851 } 863 }
864
865 public int GetQueueCount(ThrottleOutPacketType queue)
866 {
867 return m_PacketQueue.GetQueueCount(queue);
868 }
852 } 869 }
853} 870}