From 03b8eddc37705b5473225b7b749e9a98a1744651 Mon Sep 17 00:00:00 2001
From: MW
Date: Mon, 2 Mar 2009 17:18:24 +0000
Subject: Added OpenSim.Client.Linden which is a (non shared) region module
that creates and initialises the LindenClientStack (or actually whatever
client stack was set in opensim.ini) for that region. Currently this module
is still at a early stage so just for testing, so its hardcoded to be
disabled. To enable first turn off auto creation of the client stack in
opensimbase (see last revision) and then in
OpenSim.Client.Linden.LLClientStackModule change bool m_createClientStack =
false; to true.
---
OpenSim/Client/Linden/LLClientStackModule.cs | 81 ++++++++++++++++++++++++++++
prebuild.xml | 33 ++++++++++++
2 files changed, 114 insertions(+)
create mode 100644 OpenSim/Client/Linden/LLClientStackModule.cs
diff --git a/OpenSim/Client/Linden/LLClientStackModule.cs b/OpenSim/Client/Linden/LLClientStackModule.cs
new file mode 100644
index 0000000..57331e5
--- /dev/null
+++ b/OpenSim/Client/Linden/LLClientStackModule.cs
@@ -0,0 +1,81 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+using log4net;
+using Nini.Config;
+using OpenMetaverse;
+using OpenSim.Region.ClientStack;
+using OpenSim.Region.ClientStack.LindenUDP;
+using OpenSim.Framework;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Region.Framework.Interfaces;
+
+namespace OpenSim.Client.Linden
+{
+ public class LLClientStackModule : IRegionModule
+ {
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
+ #region IRegionModule Members
+
+ protected Scene m_scene;
+ protected bool m_createClientStack = false;
+ protected IClientNetworkServer m_clientServer;
+ protected ClientStackManager m_clientStackManager;
+ protected IConfigSource m_source;
+
+ protected string m_clientStackDll = "OpenSim.Region.ClientStack.LindenUDP.dll";
+
+ public void Initialise(Scene scene, IConfigSource source)
+ {
+ if (m_scene == null)
+ {
+ m_scene = scene;
+ m_source = source;
+
+ IConfig startupConfig = m_source.Configs["Startup"];
+ if (startupConfig != null)
+ {
+ m_clientStackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
+ }
+ }
+ }
+
+ public void PostInitialise()
+ {
+ if ((m_scene != null) && (m_createClientStack))
+ {
+ m_log.Info("[LLClientStackModule] Starting up LLClientStack.");
+ uint port = (uint)m_scene.RegionInfo.InternalEndPoint.Port;
+ m_clientStackManager = new ClientStackManager(m_clientStackDll);
+
+ m_clientServer
+ = m_clientStackManager.CreateServer(m_scene.RegionInfo.InternalEndPoint.Address,
+ ref port, m_scene.RegionInfo.ProxyOffset, m_scene.RegionInfo.m_allow_alternate_ports, m_source,
+ m_scene.CommsManager.AssetCache, m_scene.AuthenticateHandler);
+
+ m_clientServer.AddScene(m_scene);
+
+ m_clientServer.Start();
+ }
+ }
+
+ public void Close()
+ {
+
+ }
+
+ public string Name
+ {
+ get { return "LLClientStackModule"; }
+ }
+
+ public bool IsSharedModule
+ {
+ get { return false; }
+ }
+
+ #endregion
+ }
+}
diff --git a/prebuild.xml b/prebuild.xml
index 0b42592..5a1fcaa 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -1712,6 +1712,39 @@
+
+
+
+ ../../../bin/
+
+
+
+
+ ../../../bin/
+
+
+
+ ../../../bin/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--
cgit v1.1