From 4920e52f11dadd650e5d9621968aaa60a01c8b9b Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Fri, 3 Oct 2008 19:42:35 +0000
Subject: * oops, fix build break. * refactoring
---
OpenSim/Region/ClientStack/ClientStackManager.cs | 34 +++++++++++++++
.../Region/ClientStack/LindenUDP/LLClientView.cs | 8 ++--
.../Region/ClientStack/RegionApplicationBase.cs | 51 +++++++++++++---------
3 files changed, 70 insertions(+), 23 deletions(-)
(limited to 'OpenSim/Region/ClientStack')
diff --git a/OpenSim/Region/ClientStack/ClientStackManager.cs b/OpenSim/Region/ClientStack/ClientStackManager.cs
index 0b0c07f..2751e0a 100644
--- a/OpenSim/Region/ClientStack/ClientStackManager.cs
+++ b/OpenSim/Region/ClientStack/ClientStackManager.cs
@@ -65,11 +65,45 @@ namespace OpenSim.Region.Environment
}
}
}
+
+ ///
+ /// Create a server that can set up sessions for virtual world client <-> server communications
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public IClientNetworkServer CreateServer(
+ IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port,
+ AssetCache assetCache, AgentCircuitManager authenticateClass)
+ {
+ return CreateServer(
+ _listenIP, ref port, proxyPortOffset, allow_alternate_port, null, assetCache, authenticateClass);
+ }
+ ///
+ /// Create a server that can set up sessions for virtual world client <-> server communications
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Can be null, in which case default values are used
+ ///
+ ///
+ ///
+ ///
public IClientNetworkServer CreateServer(
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, ClientStackUserSettings settings,
AssetCache assetCache, AgentCircuitManager authenticateClass)
{
+ if (null == settings)
+ settings = new ClientStackUserSettings();
+
if (plugin != null)
{
IClientNetworkServer server =
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 199954e..5aa0f2e 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -392,8 +392,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
///
///
///
- public LLClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer,
- AgentCircuitManager authenSessions, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP)
+ public LLClientView(
+ EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer,
+ AgentCircuitManager authenSessions, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP,
+ ClientStackUserSettings userSettings)
{
m_moneyBalance = 1000;
@@ -422,7 +424,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// in it to process. It's an on-purpose threadlock though because
// without it, the clientloop will suck up all sim resources.
- m_PacketHandler = new LLPacketHandler(this, m_networkServer);
+ m_PacketHandler = new LLPacketHandler(this, m_networkServer, userSettings);
m_PacketHandler.SynchronizeClient = SynchronizeClient;
RegisterLocalPacketHandlers();
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 4db2907..4006066 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -70,6 +70,13 @@ namespace OpenSim.Region.ClientStack
{
get { return m_sceneManager; }
}
+
+ protected abstract void Initialize();
+ protected abstract PhysicsScene GetPhysicsScene();
+ protected abstract StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring);
+ protected abstract ClientStackManager CreateClientStackManager();
+ protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
+ AgentCircuitManager circuitManager);
protected override void StartupSpecific()
{
@@ -79,7 +86,11 @@ namespace OpenSim.Region.ClientStack
Initialize();
- m_httpServer = new BaseHttpServer(m_httpServerPort,m_networkServersInfo.HttpUsesSSL,m_networkServersInfo.httpSSLPort, m_networkServersInfo.HttpSSLCN);
+ m_httpServer
+ = new BaseHttpServer(
+ m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort,
+ m_networkServersInfo.HttpSSLCN);
+
if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
{
m_log.Error("[HTTP]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports");
@@ -89,19 +100,6 @@ namespace OpenSim.Region.ClientStack
m_httpServer.Start();
}
- protected abstract void Initialize();
-
- // protected void StartConsole()
- // {
- // m_console = CreateConsole();
- // MainConsole.Instance = m_console;
- // }
-
- // protected abstract ConsoleBase CreateConsole();
- protected abstract PhysicsScene GetPhysicsScene();
- protected abstract StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring);
- protected abstract ClientStackManager CreateClientStackManager();
-
protected PhysicsScene GetPhysicsScene(string engine, string meshEngine, IConfigSource config)
{
PhysicsPluginManager physicsPluginManager;
@@ -110,12 +108,28 @@ namespace OpenSim.Region.ClientStack
return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config);
}
+ ///
+ /// Create a scene and its initial base structures.
+ ///
+ ///
+ ///
+ ///
protected Scene SetupScene(RegionInfo regionInfo, out IClientNetworkServer clientServer)
{
- return SetupScene(regionInfo, 0, out clientServer);
+ return SetupScene(regionInfo, 0, null, out clientServer);
}
- protected Scene SetupScene(RegionInfo regionInfo, int proxyOffset, out IClientNetworkServer clientServer)
+ ///
+ /// Create a scene and its initial base structures.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected Scene SetupScene(
+ RegionInfo regionInfo, int proxyOffset, ClientStackUserSettings clientStackUserSettings,
+ out IClientNetworkServer clientServer)
{
AgentCircuitManager circuitManager = new AgentCircuitManager();
IPAddress listenIP = regionInfo.InternalEndPoint.Address;
@@ -126,7 +140,7 @@ namespace OpenSim.Region.ClientStack
clientServer
= m_clientStackManager.CreateServer(
- listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, new ClientStackUserSettings(),
+ listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, clientStackUserSettings,
m_assetCache, circuitManager);
regionInfo.InternalEndPoint.Port = (int)port;
@@ -172,8 +186,5 @@ namespace OpenSim.Region.ClientStack
return scene;
}
-
- protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
- AgentCircuitManager circuitManager);
}
}
--
cgit v1.1