diff options
-rw-r--r-- | OpenSim/Client/Linden/LLClientStackModule.cs | 81 | ||||
-rw-r--r-- | prebuild.xml | 33 |
2 files changed, 114 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 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Reflection; | ||
4 | using System.Text; | ||
5 | using log4net; | ||
6 | using Nini.Config; | ||
7 | using OpenMetaverse; | ||
8 | using OpenSim.Region.ClientStack; | ||
9 | using OpenSim.Region.ClientStack.LindenUDP; | ||
10 | using OpenSim.Framework; | ||
11 | using OpenSim.Region.Framework.Scenes; | ||
12 | using OpenSim.Region.Framework.Interfaces; | ||
13 | |||
14 | namespace 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 | } | ||
diff --git a/prebuild.xml b/prebuild.xml index 0b42592..5a1fcaa 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -1712,6 +1712,39 @@ | |||
1712 | </Files> | 1712 | </Files> |
1713 | </Project> | 1713 | </Project> |
1714 | 1714 | ||
1715 | <Project name="OpenSim.Client.Linden" path="OpenSim/Client/Linden" type="Library"> | ||
1716 | <Configuration name="Debug"> | ||
1717 | <Options> | ||
1718 | <OutputPath>../../../bin/</OutputPath> | ||
1719 | </Options> | ||
1720 | </Configuration> | ||
1721 | <Configuration name="Release"> | ||
1722 | <Options> | ||
1723 | <OutputPath>../../../bin/</OutputPath> | ||
1724 | </Options> | ||
1725 | </Configuration> | ||
1726 | |||
1727 | <ReferencePath>../../../bin/</ReferencePath> | ||
1728 | |||
1729 | <Reference name="OpenMetaverseTypes.dll"/> | ||
1730 | <Reference name="OpenMetaverse.dll"/> | ||
1731 | <Reference name="System"/> | ||
1732 | <Reference name="OpenSim.Framework"/> | ||
1733 | <Reference name="OpenSim.Region.Framework"/> | ||
1734 | <Reference name="OpenSim.Framework.Communications"/> | ||
1735 | <Reference name="Nini.dll" /> | ||
1736 | <Reference name="log4net.dll"/> | ||
1737 | <Reference name="protobuf-net"/> | ||
1738 | <Reference name="MXP.dll"/> | ||
1739 | <Reference name="OpenSim.Region.ClientStack"/> | ||
1740 | <Reference name="OpenSim.Region.ClientStack.LindenUDP"/> | ||
1741 | <Files> | ||
1742 | <Match pattern="*.cs" recurse="true"/> | ||
1743 | </Files> | ||
1744 | </Project> | ||
1745 | |||
1746 | |||
1747 | |||
1715 | <!-- Data Base Modules --> | 1748 | <!-- Data Base Modules --> |
1716 | <Project name="OpenSim.Data.MySQL" path="OpenSim/Data/MySQL" type="Library"> | 1749 | <Project name="OpenSim.Data.MySQL" path="OpenSim/Data/MySQL" type="Library"> |
1717 | <Configuration name="Debug"> | 1750 | <Configuration name="Debug"> |