mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
Merge of ubitworkvarnew with opensim/master as of 20150905.
This integrates the OpenSim refactoring to make physics, etc into modules. AVN physics hasn't been moved to new location. Does not compile yet. Merge branch 'osmaster' into mbworknew1
This commit is contained in:
@@ -40,8 +40,9 @@ using OpenSim.Framework;
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenSim.Framework.Monitoring;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenMetaverse;
|
||||
|
||||
using Mono.Addins;
|
||||
using TokenBucket = OpenSim.Region.ClientStack.LindenUDP.TokenBucket;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
@@ -49,14 +50,55 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
/// <summary>
|
||||
/// A shim around LLUDPServer that implements the IClientNetworkServer interface
|
||||
/// </summary>
|
||||
public sealed class LLUDPServerShim : IClientNetworkServer
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LLUDPServerShim")]
|
||||
public sealed class LLUDPServerShim : INonSharedRegionModule
|
||||
{
|
||||
private bool m_Enabled = true;
|
||||
private IConfigSource m_Config;
|
||||
LLUDPServer m_udpServer;
|
||||
|
||||
public LLUDPServerShim()
|
||||
#region INonSharedRegionModule
|
||||
public string Name
|
||||
{
|
||||
get { return "LLUDPServerShim"; }
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
m_Config = source;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
uint port = (uint)scene.RegionInfo.InternalEndPoint.Port;
|
||||
|
||||
IPAddress listenIP = scene.RegionInfo.InternalEndPoint.Address;
|
||||
Initialise(listenIP, ref port, scene.RegionInfo.ProxyOffset, scene.RegionInfo.m_allow_alternate_ports, m_Config, scene.AuthenticateHandler);
|
||||
scene.RegionInfo.InternalEndPoint.Port = (int)port;
|
||||
|
||||
AddScene(scene);
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
Start();
|
||||
}
|
||||
#endregion
|
||||
|
||||
public void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager)
|
||||
{
|
||||
m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, allow_alternate_port, configSource, circuitManager);
|
||||
@@ -200,6 +242,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
{
|
||||
m_udpServer.Stop();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Mono.Addins;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
@@ -31,3 +32,5 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
[assembly: AssemblyVersion("0.8.2.*")]
|
||||
|
||||
[assembly: Addin("LindenUDP", OpenSim.VersionInfo.VersionNumber)]
|
||||
[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)]
|
||||
|
||||
Reference in New Issue
Block a user