diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index 6864d37..c768662 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | |||
@@ -229,7 +229,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
229 | m_throttleClient | 229 | m_throttleClient |
230 | = new AdaptiveTokenBucket( | 230 | = new AdaptiveTokenBucket( |
231 | string.Format("adaptive throttle for {0} in {1}", AgentID, server.Scene.Name), | 231 | string.Format("adaptive throttle for {0} in {1}", AgentID, server.Scene.Name), |
232 | parentThrottle, rates.Total, rates.AdaptiveThrottlesEnabled); | 232 | parentThrottle, 0, rates.Total, rates.AdaptiveThrottlesEnabled); |
233 | 233 | ||
234 | // Create an array of token buckets for this clients different throttle categories | 234 | // Create an array of token buckets for this clients different throttle categories |
235 | m_throttleCategories = new TokenBucket[THROTTLE_CATEGORY_COUNT]; | 235 | m_throttleCategories = new TokenBucket[THROTTLE_CATEGORY_COUNT]; |
@@ -247,7 +247,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
247 | m_throttleCategories[i] | 247 | m_throttleCategories[i] |
248 | = new TokenBucket( | 248 | = new TokenBucket( |
249 | string.Format("{0} throttle for {1} in {2}", type, AgentID, server.Scene.Name), | 249 | string.Format("{0} throttle for {1} in {2}", type, AgentID, server.Scene.Name), |
250 | m_throttleClient, rates.GetRate(type)); | 250 | m_throttleClient, rates.GetRate(type), 0); |
251 | } | 251 | } |
252 | 252 | ||
253 | // Default the retransmission timeout to one second | 253 | // Default the retransmission timeout to one second |
@@ -293,6 +293,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
293 | m_info.assetThrottle = (int)m_throttleCategories[(int)ThrottleOutPacketType.Asset].DripRate; | 293 | m_info.assetThrottle = (int)m_throttleCategories[(int)ThrottleOutPacketType.Asset].DripRate; |
294 | m_info.textureThrottle = (int)m_throttleCategories[(int)ThrottleOutPacketType.Texture].DripRate; | 294 | m_info.textureThrottle = (int)m_throttleCategories[(int)ThrottleOutPacketType.Texture].DripRate; |
295 | m_info.totalThrottle = (int)m_throttleClient.DripRate; | 295 | m_info.totalThrottle = (int)m_throttleClient.DripRate; |
296 | m_info.targetThrottle = (int)m_throttleClient.TargetDripRate; | ||
296 | m_info.maxThrottle = (int)m_throttleClient.MaxDripRate; | 297 | m_info.maxThrottle = (int)m_throttleClient.MaxDripRate; |
297 | 298 | ||
298 | return m_info; | 299 | return m_info; |
@@ -441,28 +442,36 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
441 | } | 442 | } |
442 | 443 | ||
443 | // Update the token buckets with new throttle values | 444 | // Update the token buckets with new throttle values |
444 | TokenBucket bucket; | 445 | if (m_throttleClient.AdaptiveEnabled) |
446 | { | ||
447 | long total = resend + land + wind + cloud + task + texture + asset; | ||
448 | m_throttleClient.TargetDripRate = total; | ||
449 | } | ||
450 | else | ||
451 | { | ||
452 | TokenBucket bucket; | ||
445 | 453 | ||
446 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Resend]; | 454 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Resend]; |
447 | bucket.RequestedDripRate = resend; | 455 | bucket.RequestedDripRate = resend; |
448 | 456 | ||
449 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Land]; | 457 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Land]; |
450 | bucket.RequestedDripRate = land; | 458 | bucket.RequestedDripRate = land; |
451 | 459 | ||
452 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Wind]; | 460 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Wind]; |
453 | bucket.RequestedDripRate = wind; | 461 | bucket.RequestedDripRate = wind; |
454 | 462 | ||
455 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Cloud]; | 463 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Cloud]; |
456 | bucket.RequestedDripRate = cloud; | 464 | bucket.RequestedDripRate = cloud; |
457 | 465 | ||
458 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Asset]; | 466 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Asset]; |
459 | bucket.RequestedDripRate = asset; | 467 | bucket.RequestedDripRate = asset; |
460 | 468 | ||
461 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Task]; | 469 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Task]; |
462 | bucket.RequestedDripRate = task; | 470 | bucket.RequestedDripRate = task; |
463 | 471 | ||
464 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Texture]; | 472 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Texture]; |
465 | bucket.RequestedDripRate = texture; | 473 | bucket.RequestedDripRate = texture; |
474 | } | ||
466 | 475 | ||
467 | // Reset the packed throttles cached data | 476 | // Reset the packed throttles cached data |
468 | m_packedThrottles = null; | 477 | m_packedThrottles = null; |