aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/ClientView.PacketQueue.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/ClientView.PacketQueue.cs')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.PacketQueue.cs80
1 files changed, 73 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.PacketQueue.cs b/OpenSim/Region/ClientStack/ClientView.PacketQueue.cs
index 3ce3d8c..bd22970 100644
--- a/OpenSim/Region/ClientStack/ClientView.PacketQueue.cs
+++ b/OpenSim/Region/ClientStack/ClientView.PacketQueue.cs
@@ -225,28 +225,94 @@ namespace OpenSim.Region.ClientStack
225 item.Packet = NewPack; 225 item.Packet = NewPack;
226 item.Incoming = false; 226 item.Incoming = false;
227 item.throttleType = throttlePacketType; // Packet throttle type 227 item.throttleType = throttlePacketType; // Packet throttle type
228
229 // The idea.. is if the packet throttle queues are empty and the client is under throttle for the type.
230 // Queue it up directly.
228 switch (throttlePacketType) 231 switch (throttlePacketType)
229 { 232 {
230 case ThrottleOutPacketType.Resend: 233 case ThrottleOutPacketType.Resend:
231 ResendOutgoingPacketQueue.Enqueue(item); 234 if (ResendthrottleSentPeriod <= ResendthrottleOutbound && ResendOutgoingPacketQueue.Count == 0)
235 {
236 throttleSentPeriod += item.Packet.ToBytes().Length;
237 ResendthrottleSentPeriod += item.Packet.ToBytes().Length;
238 PacketQueue.Enqueue(item);
239 }
240 else
241 {
242 ResendOutgoingPacketQueue.Enqueue(item);
243 }
232 break; 244 break;
233 case ThrottleOutPacketType.Texture: 245 case ThrottleOutPacketType.Texture:
234 TextureOutgoingPacketQueue.Enqueue(item); 246 if (TexturethrottleSentPeriod <= TexturethrottleOutbound && TextureOutgoingPacketQueue.Count == 0)
247 {
248 throttleSentPeriod += item.Packet.ToBytes().Length;
249 TexturethrottleSentPeriod += item.Packet.ToBytes().Length;
250 PacketQueue.Enqueue(item);
251 }
252 else
253 {
254 TextureOutgoingPacketQueue.Enqueue(item);
255 }
235 break; 256 break;
236 case ThrottleOutPacketType.Task: 257 case ThrottleOutPacketType.Task:
237 TaskOutgoingPacketQueue.Enqueue(item); 258 if (TaskthrottleSentPeriod <= TaskthrottleOutbound && TaskOutgoingPacketQueue.Count == 0)
259 {
260 throttleSentPeriod += item.Packet.ToBytes().Length;
261 TaskthrottleSentPeriod += item.Packet.ToBytes().Length;
262 PacketQueue.Enqueue(item);
263 }
264 else
265 {
266 TaskOutgoingPacketQueue.Enqueue(item);
267 }
238 break; 268 break;
239 case ThrottleOutPacketType.Land: 269 case ThrottleOutPacketType.Land:
240 LandOutgoingPacketQueue.Enqueue(item); 270 if (LandthrottleSentPeriod <= LandthrottleOutbound && LandOutgoingPacketQueue.Count == 0)
271 {
272 throttleSentPeriod += item.Packet.ToBytes().Length;
273 LandthrottleSentPeriod += item.Packet.ToBytes().Length;
274 PacketQueue.Enqueue(item);
275 }
276 else
277 {
278 LandOutgoingPacketQueue.Enqueue(item);
279 }
241 break; 280 break;
242 case ThrottleOutPacketType.Asset: 281 case ThrottleOutPacketType.Asset:
243 AssetOutgoingPacketQueue.Enqueue(item); 282 if (AssetthrottleSentPeriod <= AssetthrottleOutbound && AssetOutgoingPacketQueue.Count == 0)
283 {
284 throttleSentPeriod += item.Packet.ToBytes().Length;
285 AssetthrottleSentPeriod += item.Packet.ToBytes().Length;
286 PacketQueue.Enqueue(item);
287 }
288 else
289 {
290 AssetOutgoingPacketQueue.Enqueue(item);
291 }
244 break; 292 break;
245 case ThrottleOutPacketType.Cloud: 293 case ThrottleOutPacketType.Cloud:
246 CloudOutgoingPacketQueue.Enqueue(item); 294 if (CloudthrottleSentPeriod <= CloudthrottleOutbound && CloudOutgoingPacketQueue.Count == 0)
295 {
296 throttleSentPeriod += item.Packet.ToBytes().Length;
297 CloudthrottleSentPeriod += item.Packet.ToBytes().Length;
298 PacketQueue.Enqueue(item);
299 }
300 else
301 {
302 CloudOutgoingPacketQueue.Enqueue(item);
303 }
247 break; 304 break;
248 case ThrottleOutPacketType.Wind: 305 case ThrottleOutPacketType.Wind:
249 WindOutgoingPacketQueue.Enqueue(item); 306 if (WindthrottleSentPeriod <= WindthrottleOutbound && WindOutgoingPacketQueue.Count == 0)
307 {
308 throttleSentPeriod += item.Packet.ToBytes().Length;
309 WindthrottleSentPeriod += item.Packet.ToBytes().Length;
310 PacketQueue.Enqueue(item);
311 }
312 else
313 {
314 WindOutgoingPacketQueue.Enqueue(item);
315 }
250 break; 316 break;
251 317
252 default: 318 default: