mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Allow the notation config_name@port/dll_name:class_name as a handler spec
in OpenSim.Server.ini This allows things like "8003/AssetServirce.dll local@8004/InventoryService.dll" The config name is not yet supported by any modules
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Reflection;
|
||||
using OpenSim.Framework;
|
||||
@@ -45,12 +46,27 @@ namespace OpenSim.Server.Base
|
||||
// The http server instance
|
||||
//
|
||||
protected BaseHttpServer m_HttpServer = null;
|
||||
protected uint m_Port = 0;
|
||||
protected Dictionary<uint, BaseHttpServer> m_Servers =
|
||||
new Dictionary<uint, BaseHttpServer>();
|
||||
|
||||
public IHttpServer HttpServer
|
||||
{
|
||||
get { return m_HttpServer; }
|
||||
}
|
||||
|
||||
public IHttpServer GetHttpServer(uint port)
|
||||
{
|
||||
if (port == m_Port)
|
||||
return HttpServer;
|
||||
|
||||
if (m_Servers.ContainsKey(port))
|
||||
return m_Servers[port];
|
||||
|
||||
m_Servers[port] = new BaseHttpServer(port);
|
||||
return m_Servers[port];
|
||||
}
|
||||
|
||||
// Handle all the automagical stuff
|
||||
//
|
||||
public HttpServerBase(string prompt, string[] args) : base(prompt, args)
|
||||
@@ -74,6 +90,8 @@ namespace OpenSim.Server.Base
|
||||
Thread.CurrentThread.Abort();
|
||||
}
|
||||
|
||||
m_Port = port;
|
||||
|
||||
m_HttpServer = new BaseHttpServer(port);
|
||||
|
||||
MainServer.Instance = m_HttpServer;
|
||||
|
||||
Reference in New Issue
Block a user