aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
diff options
context:
space:
mode:
authorUbitUmarov2014-08-28 16:49:32 +0100
committerUbitUmarov2014-08-28 16:49:32 +0100
commit5a2d4fd47f64a656b36fd428473715d9f764729b (patch)
tree28f0723946425081ff683524a3bb0d8e15eb1198 /OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
parent send all presences terseupdates in same batch (diff)
downloadopensim-SC-5a2d4fd47f64a656b36fd428473715d9f764729b.zip
opensim-SC-5a2d4fd47f64a656b36fd428473715d9f764729b.tar.gz
opensim-SC-5a2d4fd47f64a656b36fd428473715d9f764729b.tar.bz2
opensim-SC-5a2d4fd47f64a656b36fd428473715d9f764729b.tar.xz
add some functions for estimation of number of bytes that can be send in a category in specified time
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs8
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.