work around some warnings
parent
b70e48c8a5
commit
b2c553b459
|
@ -111,6 +111,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// hooked to put more data on the empty queue</summary>
|
/// hooked to put more data on the empty queue</summary>
|
||||||
public event QueueEmpty OnQueueEmpty;
|
public event QueueEmpty OnQueueEmpty;
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design","CA1009:DeclareEventHandlersCorrectly")]
|
||||||
public event Func<ThrottleOutPacketTypeFlags, bool> HasUpdates;
|
public event Func<ThrottleOutPacketTypeFlags, bool> HasUpdates;
|
||||||
|
|
||||||
/// <summary>AgentID for this client</summary>
|
/// <summary>AgentID for this client</summary>
|
||||||
|
|
|
@ -521,7 +521,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
// if (usePools)
|
// if (usePools)
|
||||||
// EnablePools();
|
// EnablePools();
|
||||||
DisablePools();
|
base.DisablePools();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
|
|
|
@ -179,6 +179,11 @@ namespace OpenMetaverse
|
||||||
// m_dropRandomGenerator = new Random();
|
// m_dropRandomGenerator = new Random();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~OpenSimUDPBase()
|
||||||
|
{
|
||||||
|
if(m_udpSocket !=null)
|
||||||
|
try { m_udpSocket.Close(); } catch { }
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Start inbound UDP packet handling.
|
/// Start inbound UDP packet handling.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -97,7 +97,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected float m_burst;
|
protected float m_burst;
|
||||||
|
|
||||||
public virtual float MaxDripRate { get; set; }
|
protected float m_maxDripRate = 0;
|
||||||
|
public virtual float MaxDripRate
|
||||||
|
{
|
||||||
|
get { return m_maxDripRate; }
|
||||||
|
set { m_maxDripRate = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public float RequestedBurst
|
public float RequestedBurst
|
||||||
{
|
{
|
||||||
|
@ -134,7 +139,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// the system tick interval (typically around 15-22ms)</remarks>
|
/// the system tick interval (typically around 15-22ms)</remarks>
|
||||||
protected float m_dripRate;
|
protected float m_dripRate;
|
||||||
|
|
||||||
public virtual float RequestedDripRate
|
public float RequestedDripRate
|
||||||
{
|
{
|
||||||
get { return (m_dripRate == 0 ? m_totalDripRequest : m_dripRate); }
|
get { return (m_dripRate == 0 ? m_totalDripRequest : m_dripRate); }
|
||||||
set {
|
set {
|
||||||
|
@ -146,7 +151,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual float DripRate
|
public float DripRate
|
||||||
{
|
{
|
||||||
get {
|
get {
|
||||||
float rate = Math.Min(RequestedDripRate,TotalDripRequest);
|
float rate = Math.Min(RequestedDripRate,TotalDripRequest);
|
||||||
|
@ -344,7 +349,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// greater than this.
|
// greater than this.
|
||||||
// </summary>
|
// </summary>
|
||||||
|
|
||||||
protected float m_maxDripRate = 0;
|
|
||||||
public override float MaxDripRate
|
public override float MaxDripRate
|
||||||
{
|
{
|
||||||
get { return (m_maxDripRate == 0 ? m_totalDripRequest : m_maxDripRate); }
|
get { return (m_maxDripRate == 0 ? m_totalDripRequest : m_maxDripRate); }
|
||||||
|
@ -359,7 +363,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// <summary>
|
// <summary>
|
||||||
// Adjust drip rate in response to network conditions.
|
// Adjust drip rate in response to network conditions.
|
||||||
// </summary>
|
// </summary>
|
||||||
public virtual float AdjustedDripRate
|
public float AdjustedDripRate
|
||||||
{
|
{
|
||||||
get { return m_dripRate; }
|
get { return m_dripRate; }
|
||||||
set
|
set
|
||||||
|
@ -380,12 +384,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
m_enabled = enabled;
|
m_enabled = enabled;
|
||||||
|
|
||||||
MaxDripRate = maxDripRate;
|
m_maxDripRate = (maxDripRate == 0 ? m_totalDripRequest : Math.Max(maxDripRate, m_minimumFlow));
|
||||||
|
|
||||||
if (enabled)
|
if (enabled)
|
||||||
AdjustedDripRate = m_maxDripRate * .5f;
|
m_dripRate = m_maxDripRate * .5f;
|
||||||
else
|
else
|
||||||
AdjustedDripRate = m_maxDripRate;
|
m_dripRate = m_maxDripRate;
|
||||||
|
if (m_parent != null)
|
||||||
|
m_parent.RegisterRequest(this, m_dripRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue