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.

0.6.4-rc1
MW 2009-03-02 17:18:24 +00:00
parent 3c46ee9326
commit 03b8eddc37
2 changed files with 114 additions and 0 deletions

View File

@ -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
}
}

View File

@ -1712,6 +1712,39 @@
</Files>
</Project>
<Project name="OpenSim.Client.Linden" path="OpenSim/Client/Linden" type="Library">
<Configuration name="Debug">
<Options>
<OutputPath>../../../bin/</OutputPath>
</Options>
</Configuration>
<Configuration name="Release">
<Options>
<OutputPath>../../../bin/</OutputPath>
</Options>
</Configuration>
<ReferencePath>../../../bin/</ReferencePath>
<Reference name="OpenMetaverseTypes.dll"/>
<Reference name="OpenMetaverse.dll"/>
<Reference name="System"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Region.Framework"/>
<Reference name="OpenSim.Framework.Communications"/>
<Reference name="Nini.dll" />
<Reference name="log4net.dll"/>
<Reference name="protobuf-net"/>
<Reference name="MXP.dll"/>
<Reference name="OpenSim.Region.ClientStack"/>
<Reference name="OpenSim.Region.ClientStack.LindenUDP"/>
<Files>
<Match pattern="*.cs" recurse="true"/>
</Files>
</Project>
<!-- Data Base Modules -->
<Project name="OpenSim.Data.MySQL" path="OpenSim/Data/MySQL" type="Library">
<Configuration name="Debug">