aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-12-17 17:01:02 +0000
committerJustin Clarke Casey2008-12-17 17:01:02 +0000
commit2e79fd0f0c33b43cece2a698dc3ec4d65c27e72c (patch)
tree29403b966e392e4619568aa06bcfc9b1ec621302
parent* minor: Remove unused AppearanceTableMapper as pointed out by jonc in http:/... (diff)
downloadopensim-SC_OLD-2e79fd0f0c33b43cece2a698dc3ec4d65c27e72c.zip
opensim-SC_OLD-2e79fd0f0c33b43cece2a698dc3ec4d65c27e72c.tar.gz
opensim-SC_OLD-2e79fd0f0c33b43cece2a698dc3ec4d65c27e72c.tar.bz2
opensim-SC_OLD-2e79fd0f0c33b43cece2a698dc3ec4d65c27e72c.tar.xz
* minor: Minor documentation and small minor change on LLPacketThrottle to remove some unnecessary lines
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs42
1 files changed, 22 insertions, 20 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs
index 31efee7..6d199ad 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs
@@ -40,6 +40,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
40 /// Value with which to multiply all the throttle fields 40 /// Value with which to multiply all the throttle fields
41 /// </value> 41 /// </value>
42 private float m_throttleMultiplier; 42 private float m_throttleMultiplier;
43
44 public int Max
45 {
46 get { return m_maxAllowableThrottle; }
47 }
48
49 public int Min
50 {
51 get { return m_minAllowableThrottle; }
52 }
43 53
44 /// <summary> 54 /// <summary>
45 /// Constructor. 55 /// Constructor.
@@ -64,9 +74,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
64 CalcBits(); 74 CalcBits();
65 } 75 }
66 76
67 public void CalcBits() 77 /// <summary>
78 /// Calculate the actual throttle required.
79 /// </summary>
80 private void CalcBits()
68 { 81 {
69 m_throttleBits = (int)((float)m_currentThrottle*m_throttleMultiplier/(float)m_throttleTimeDivisor); 82 m_throttleBits = (int)((float)m_currentThrottle * m_throttleMultiplier / (float)m_throttleTimeDivisor);
70 } 83 }
71 84
72 public void Reset() 85 public void Reset()
@@ -85,34 +98,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
85 return m_currentBitsSent; 98 return m_currentBitsSent;
86 } 99 }
87 100
88 public int Max
89 {
90 get { return m_maxAllowableThrottle; }
91 }
92
93 public int Min
94 {
95 get { return m_minAllowableThrottle; }
96 }
97
98 public int Throttle 101 public int Throttle
99 { 102 {
100 get { return m_currentThrottle; } 103 get { return m_currentThrottle; }
101 set 104 set
102 { 105 {
103 if (value < m_minAllowableThrottle) 106 if (value < m_minAllowableThrottle)
104 { 107 {
105 m_currentThrottle = m_minAllowableThrottle; 108 m_currentThrottle = m_minAllowableThrottle;
106 CalcBits(); 109 }
107 return; 110 else if (value > m_maxAllowableThrottle)
108 }
109 if (value > m_maxAllowableThrottle)
110 { 111 {
111 m_currentThrottle = m_maxAllowableThrottle; 112 m_currentThrottle = m_maxAllowableThrottle;
112 CalcBits();
113 return;
114 } 113 }
115 m_currentThrottle = value; 114 else
115 {
116 m_currentThrottle = value;
117 }
116 118
117 CalcBits(); 119 CalcBits();
118 } 120 }