diff options
author | Melanie | 2009-10-01 21:08:17 +0100 |
---|---|---|
committer | Melanie | 2009-10-01 21:08:17 +0100 |
commit | 5e9da4daabc49250af9c0ec810b1290c74bad885 (patch) | |
tree | 532821dc84556e6f395545a027fdfcfddf7c8bda /OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | |
parent | Fixing LLClientView memory leak (diff) | |
download | opensim-SC_OLD-5e9da4daabc49250af9c0ec810b1290c74bad885.zip opensim-SC_OLD-5e9da4daabc49250af9c0ec810b1290c74bad885.tar.gz opensim-SC_OLD-5e9da4daabc49250af9c0ec810b1290c74bad885.tar.bz2 opensim-SC_OLD-5e9da4daabc49250af9c0ec810b1290c74bad885.tar.xz |
Add OnQueueEmpty event to the packet layers. No user functinality yet
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs index 67ece75..801e0c5 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) |