* minor: Minor documentation and small minor change on LLPacketThrottle to remove some unnecessary lines
parent
ac451485d6
commit
2e79fd0f0c
|
@ -41,6 +41,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
/// </value>
|
||||
private float m_throttleMultiplier;
|
||||
|
||||
public int Max
|
||||
{
|
||||
get { return m_maxAllowableThrottle; }
|
||||
}
|
||||
|
||||
public int Min
|
||||
{
|
||||
get { return m_minAllowableThrottle; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
|
@ -64,9 +74,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
CalcBits();
|
||||
}
|
||||
|
||||
public void CalcBits()
|
||||
/// <summary>
|
||||
/// Calculate the actual throttle required.
|
||||
/// </summary>
|
||||
private void CalcBits()
|
||||
{
|
||||
m_throttleBits = (int)((float)m_currentThrottle*m_throttleMultiplier/(float)m_throttleTimeDivisor);
|
||||
m_throttleBits = (int)((float)m_currentThrottle * m_throttleMultiplier / (float)m_throttleTimeDivisor);
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
|
@ -85,16 +98,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
return m_currentBitsSent;
|
||||
}
|
||||
|
||||
public int Max
|
||||
{
|
||||
get { return m_maxAllowableThrottle; }
|
||||
}
|
||||
|
||||
public int Min
|
||||
{
|
||||
get { return m_minAllowableThrottle; }
|
||||
}
|
||||
|
||||
public int Throttle
|
||||
{
|
||||
get { return m_currentThrottle; }
|
||||
|
@ -103,16 +106,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
if (value < m_minAllowableThrottle)
|
||||
{
|
||||
m_currentThrottle = m_minAllowableThrottle;
|
||||
CalcBits();
|
||||
return;
|
||||
}
|
||||
if (value > m_maxAllowableThrottle)
|
||||
else if (value > m_maxAllowableThrottle)
|
||||
{
|
||||
m_currentThrottle = m_maxAllowableThrottle;
|
||||
CalcBits();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_currentThrottle = value;
|
||||
}
|
||||
|
||||
CalcBits();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue