diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index bb68921..7c55b37 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | |||
@@ -453,6 +453,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
453 | 453 | ||
454 | return data; | 454 | return data; |
455 | } | 455 | } |
456 | |||
457 | public int GetCatBytesCanSend(ThrottleOutPacketType cat, int timeMS) | ||
458 | { | ||
459 | TokenBucket bucket = m_throttleCategories[(int)cat]; | ||
460 | int bytes = timeMS * (int)(bucket.RequestedDripRate / 1000); | ||
461 | bytes += (int)bucket.CurrentTokenCount(); | ||
462 | return bytes; | ||
463 | } | ||
456 | 464 | ||
457 | /// <summary> | 465 | /// <summary> |
458 | /// Queue an outgoing packet if appropriate. | 466 | /// Queue an outgoing packet if appropriate. |