diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 8f90f34..8655d80 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | |||
@@ -79,14 +79,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
79 | // private long LastThrottle; | 79 | // private long LastThrottle; |
80 | // private long ThrottleInterval; | 80 | // private long ThrottleInterval; |
81 | private Timer throttleTimer; | 81 | private Timer throttleTimer; |
82 | 82 | ||
83 | private LLUUID m_agentId; | 83 | private LLUUID m_agentId; |
84 | 84 | ||
85 | public LLPacketQueue(LLUUID agentId) | 85 | public LLPacketQueue(LLUUID agentId) |
86 | { | 86 | { |
87 | // While working on this, the BlockingQueue had me fooled for a bit. | 87 | // While working on this, the BlockingQueue had me fooled for a bit. |
88 | // The Blocking queue causes the thread to stop until there's something | 88 | // The Blocking queue causes the thread to stop until there's something |
89 | // in it to process. it's an on-purpose threadlock though because | 89 | // in it to process. it's an on-purpose threadlock though because |
90 | // without it, the clientloop will suck up all sim resources. | 90 | // without it, the clientloop will suck up all sim resources. |
91 | 91 | ||
92 | SendQueue = new BlockingQueue<LLQueItem>(); | 92 | SendQueue = new BlockingQueue<LLQueItem>(); |
@@ -111,7 +111,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
111 | AssetThrottle = new LLPacketThrottle(1000, 800000, 1000); | 111 | AssetThrottle = new LLPacketThrottle(1000, 800000, 1000); |
112 | TextureThrottle = new LLPacketThrottle(1000, 800000, 4000); | 112 | TextureThrottle = new LLPacketThrottle(1000, 800000, 4000); |
113 | // Total Throttle trumps all | 113 | // Total Throttle trumps all |
114 | // Number of bytes allowed to go out per second. (256kbps per client) | 114 | // Number of bytes allowed to go out per second. (256kbps per client) |
115 | TotalThrottle = new LLPacketThrottle(0, 1500000, 28000); | 115 | TotalThrottle = new LLPacketThrottle(0, 1500000, 28000); |
116 | 116 | ||
117 | throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); | 117 | throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); |
@@ -121,10 +121,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
121 | // TIMERS needed for this | 121 | // TIMERS needed for this |
122 | // LastThrottle = DateTime.Now.Ticks; | 122 | // LastThrottle = DateTime.Now.Ticks; |
123 | // ThrottleInterval = (long)(throttletimems/throttleTimeDivisor); | 123 | // ThrottleInterval = (long)(throttletimems/throttleTimeDivisor); |
124 | 124 | ||
125 | m_agentId = agentId; | 125 | m_agentId = agentId; |
126 | 126 | ||
127 | if (StatsManager.SimExtraStats != null) | 127 | if (StatsManager.SimExtraStats != null) |
128 | { | 128 | { |
129 | StatsManager.SimExtraStats.RegisterPacketQueueStatsProvider(m_agentId, this); | 129 | StatsManager.SimExtraStats.RegisterPacketQueueStatsProvider(m_agentId, this); |
130 | } | 130 | } |
@@ -234,11 +234,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
234 | 234 | ||
235 | m_enabled = false; | 235 | m_enabled = false; |
236 | throttleTimer.Stop(); | 236 | throttleTimer.Stop(); |
237 | 237 | ||
238 | if (StatsManager.SimExtraStats != null) | 238 | if (StatsManager.SimExtraStats != null) |
239 | { | 239 | { |
240 | StatsManager.SimExtraStats.DeregisterPacketQueueStatsProvider(m_agentId); | 240 | StatsManager.SimExtraStats.DeregisterPacketQueueStatsProvider(m_agentId); |
241 | } | 241 | } |
242 | } | 242 | } |
243 | 243 | ||
244 | private void ResetCounters() | 244 | private void ResetCounters() |
@@ -275,7 +275,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
275 | int MaxThrottleLoops = 4550; // 50*7 packets can be dequeued at once. | 275 | int MaxThrottleLoops = 4550; // 50*7 packets can be dequeued at once. |
276 | int throttleLoops = 0; | 276 | int throttleLoops = 0; |
277 | 277 | ||
278 | // We're going to dequeue all of the saved up packets until | 278 | // We're going to dequeue all of the saved up packets until |
279 | // we've hit the throttle limit or there's no more packets to send | 279 | // we've hit the throttle limit or there's no more packets to send |
280 | lock (this) | 280 | lock (this) |
281 | { | 281 | { |
@@ -428,8 +428,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
428 | //Agent Throttle Block contains 7 single floatingpoint values. | 428 | //Agent Throttle Block contains 7 single floatingpoint values. |
429 | int j = 0; | 429 | int j = 0; |
430 | 430 | ||
431 | // Some Systems may be big endian... | 431 | // Some Systems may be big endian... |
432 | // it might be smart to do this check more often... | 432 | // it might be smart to do this check more often... |
433 | if (!BitConverter.IsLittleEndian) | 433 | if (!BitConverter.IsLittleEndian) |
434 | for (int i = 0; i < 7; i++) | 434 | for (int i = 0; i < 7; i++) |
435 | Array.Reverse(throttle, j + i*singlefloat, singlefloat); | 435 | Array.Reverse(throttle, j + i*singlefloat, singlefloat); |
@@ -508,7 +508,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
508 | // effectively wiggling the slider causes things reset | 508 | // effectively wiggling the slider causes things reset |
509 | ResetCounters(); | 509 | ResetCounters(); |
510 | } | 510 | } |
511 | 511 | ||
512 | // See IPullStatsProvider | 512 | // See IPullStatsProvider |
513 | public string GetStats() | 513 | public string GetStats() |
514 | { | 514 | { |
@@ -522,7 +522,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
522 | CloudOutgoingPacketQueue.Count, | 522 | CloudOutgoingPacketQueue.Count, |
523 | TaskOutgoingPacketQueue.Count, | 523 | TaskOutgoingPacketQueue.Count, |
524 | TextureOutgoingPacketQueue.Count, | 524 | TextureOutgoingPacketQueue.Count, |
525 | AssetOutgoingPacketQueue.Count); | 525 | AssetOutgoingPacketQueue.Count); |
526 | } | 526 | } |
527 | 527 | ||
528 | public LLQueItem[] GetQueueArray() | 528 | public LLQueItem[] GetQueueArray() |