aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Client/Linden/LLClientStackModule.cs
diff options
context:
space:
mode:
authorMW2009-03-02 17:18:24 +0000
committerMW2009-03-02 17:18:24 +0000
commit03b8eddc37705b5473225b7b749e9a98a1744651 (patch)
tree638a223759133f97e997ffc2bbc0735f97318f3a /OpenSim/Client/Linden/LLClientStackModule.cs
parentMoved the SetupScene methods from RegionApplicationBase to OpenSimBase [Do we... (diff)
downloadopensim-SC_OLD-03b8eddc37705b5473225b7b749e9a98a1744651.zip
opensim-SC_OLD-03b8eddc37705b5473225b7b749e9a98a1744651.tar.gz
opensim-SC_OLD-03b8eddc37705b5473225b7b749e9a98a1744651.tar.bz2
opensim-SC_OLD-03b8eddc37705b5473225b7b749e9a98a1744651.tar.xz
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.
Diffstat (limited to 'OpenSim/Client/Linden/LLClientStackModule.cs')
-rw-r--r--OpenSim/Client/Linden/LLClientStackModule.cs81
1 files changed, 81 insertions, 0 deletions
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 @@
1using System;
2using System.Collections.Generic;
3using System.Reflection;
4using System.Text;
5using log4net;
6using Nini.Config;
7using OpenMetaverse;
8using OpenSim.Region.ClientStack;
9using OpenSim.Region.ClientStack.LindenUDP;
10using OpenSim.Framework;
11using OpenSim.Region.Framework.Scenes;
12using OpenSim.Region.Framework.Interfaces;
13
14namespace OpenSim.Client.Linden
15{
16 public class LLClientStackModule : IRegionModule
17 {
18 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
19
20 #region IRegionModule Members
21
22 protected Scene m_scene;
23 protected bool m_createClientStack = false;
24 protected IClientNetworkServer m_clientServer;
25 protected ClientStackManager m_clientStackManager;
26 protected IConfigSource m_source;
27
28 protected string m_clientStackDll = "OpenSim.Region.ClientStack.LindenUDP.dll";
29
30 public void Initialise(Scene scene, IConfigSource source)
31 {
32 if (m_scene == null)
33 {
34 m_scene = scene;
35 m_source = source;
36
37 IConfig startupConfig = m_source.Configs["Startup"];
38 if (startupConfig != null)
39 {
40 m_clientStackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
41 }
42 }
43 }
44
45 public void PostInitialise()
46 {
47 if ((m_scene != null) && (m_createClientStack))
48 {
49 m_log.Info("[LLClientStackModule] Starting up LLClientStack.");
50 uint port = (uint)m_scene.RegionInfo.InternalEndPoint.Port;
51 m_clientStackManager = new ClientStackManager(m_clientStackDll);
52
53 m_clientServer
54 = m_clientStackManager.CreateServer(m_scene.RegionInfo.InternalEndPoint.Address,
55 ref port, m_scene.RegionInfo.ProxyOffset, m_scene.RegionInfo.m_allow_alternate_ports, m_source,
56 m_scene.CommsManager.AssetCache, m_scene.AuthenticateHandler);
57
58 m_clientServer.AddScene(m_scene);
59
60 m_clientServer.Start();
61 }
62 }
63
64 public void Close()
65 {
66
67 }
68
69 public string Name
70 {
71 get { return "LLClientStackModule"; }
72 }
73
74 public bool IsSharedModule
75 {
76 get { return false; }
77 }
78
79 #endregion
80 }
81}