From c383dbd06dd98ca96543c9bfdf9a7376a7e55cc2 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 21 Jan 2011 00:38:16 +0000
Subject: implement "show throttles" command for showing current agent
throttles and the server settings.
This is in a very crude state, currently.
The LindenUDPModule was renamed LindenUDPInfoModule and moved to OptionalModules
OptionalModules was given a direct reference to OpenSim.Region.ClientStack.LindenUDP so that it can inspect specific LindenUDP settings without having to generalize those to all client views (some of which may have no concept of the settings involved).
This might be ess messy if OpenSim.Region.ClientStack.LindenUDP were a region module instead, like MXP, IRC and NPC
---
OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 1 +
OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 8 +++++---
2 files changed, 6 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/ClientStack/LindenUDP')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index e43e3c9..5dab1bc 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -368,6 +368,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Properties
public LLUDPClient UDPClient { get { return m_udpClient; } }
+ public LLUDPServer UDPServer { get { return m_udpServer; } }
public IPEndPoint RemoteEndPoint { get { return m_udpClient.RemoteEndPoint; } }
public UUID SecureSessionId { get { return m_secureSessionId; } }
public IScene Scene { get { return m_scene; } }
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 571624b..df8ddbb 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -114,8 +114,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//private UDPClientCollection m_clients = new UDPClientCollection();
/// Bandwidth throttle for this UDP server
protected TokenBucket m_throttle;
+
/// Bandwidth throttle rates for this UDP server
- protected ThrottleRates m_throttleRates;
+ public ThrottleRates ThrottleRates { get; private set; }
+
/// Manages authentication for agent circuits
private AgentCircuitManager m_circuitManager;
/// Reference to the scene this UDP server is attached to
@@ -226,7 +228,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion BinaryStats
m_throttle = new TokenBucket(null, sceneThrottleBps, sceneThrottleBps);
- m_throttleRates = new ThrottleRates(configSource);
+ ThrottleRates = new ThrottleRates(configSource);
}
public void Start()
@@ -922,7 +924,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected virtual void AddClient(uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
{
// Create the LLUDPClient
- LLUDPClient udpClient = new LLUDPClient(this, m_throttleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
+ LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
IClientAPI existingClient;
if (!m_scene.TryGetClient(agentID, out existingClient))
--
cgit v1.1