aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
index 0a64095..bdbd284 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs
@@ -98,6 +98,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
98 } 98 }
99 99
100 /// <summary> 100 /// <summary>
101 /// The speed limit of this bucket in bytes per millisecond
102 /// </summary>
103 public int DripPerMS
104 {
105 get { return tokensPerMS; }
106 }
107
108 /// <summary>
101 /// The number of bytes that can be sent at this moment. This is the 109 /// The number of bytes that can be sent at this moment. This is the
102 /// current number of tokens in the bucket 110 /// current number of tokens in the bucket
103 /// <remarks>If this bucket has a parent bucket that does not have 111 /// <remarks>If this bucket has a parent bucket that does not have
@@ -106,11 +114,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
106 /// </summary> 114 /// </summary>
107 public int Content 115 public int Content
108 { 116 {
109 get 117 get { return content; }
110 {
111 Drip();
112 return content;
113 }
114 } 118 }
115 119
116 #endregion Properties 120 #endregion Properties
@@ -182,7 +186,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
182 /// call to Drip 186 /// call to Drip
183 /// </summary> 187 /// </summary>
184 /// <returns>True if tokens were added to the bucket, otherwise false</returns> 188 /// <returns>True if tokens were added to the bucket, otherwise false</returns>
185 private bool Drip() 189 public bool Drip()
186 { 190 {
187 if (tokensPerMS == 0) 191 if (tokensPerMS == 0)
188 { 192 {