aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/PacketQueue.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/PacketQueue.cs')
-rw-r--r--OpenSim/Region/ClientStack/PacketQueue.cs41
1 files changed, 39 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/PacketQueue.cs b/OpenSim/Region/ClientStack/PacketQueue.cs
index 193b4d7..747ef18 100644
--- a/OpenSim/Region/ClientStack/PacketQueue.cs
+++ b/OpenSim/Region/ClientStack/PacketQueue.cs
@@ -168,10 +168,47 @@ namespace OpenSim.Region.ClientStack
168 return SendQueue.Dequeue(); 168 return SendQueue.Dequeue();
169 } 169 }
170 170
171 public void Flush()
172 {
173 lock(this) {
174 while (PacketsWaiting())
175 {
176 //Now comes the fun part.. we dump all our elements into PacketQueue that we've saved up.
177 if (ResendOutgoingPacketQueue.Count > 0)
178 {
179 SendQueue.Enqueue(ResendOutgoingPacketQueue.Dequeue());
180 }
181 if (LandOutgoingPacketQueue.Count > 0)
182 {
183 SendQueue.Enqueue(LandOutgoingPacketQueue.Dequeue());
184 }
185 if (WindOutgoingPacketQueue.Count > 0)
186 {
187 SendQueue.Enqueue(WindOutgoingPacketQueue.Dequeue());
188 }
189 if (CloudOutgoingPacketQueue.Count > 0)
190 {
191 SendQueue.Enqueue(CloudOutgoingPacketQueue.Dequeue());
192 }
193 if (TaskOutgoingPacketQueue.Count > 0)
194 {
195 SendQueue.Enqueue(TaskOutgoingPacketQueue.Dequeue());
196 }
197 if (TextureOutgoingPacketQueue.Count > 0)
198 {
199 SendQueue.Enqueue(TextureOutgoingPacketQueue.Dequeue());
200 }
201 if (AssetOutgoingPacketQueue.Count > 0)
202 {
203 SendQueue.Enqueue(AssetOutgoingPacketQueue.Dequeue());
204 }
205 }
206 // MainLog.Instance.Verbose("THROTTLE", "Processed " + throttleLoops + " packets");
207 }
208 }
209
171 public void Close() 210 public void Close()
172 { 211 {
173 // one last push
174 ProcessThrottle();
175 throttleTimer.Stop(); 212 throttleTimer.Stop();
176 } 213 }
177 214