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:
Melanie
2009-09-28 22:48:57 +01:00
parent 7cd03abab5
commit a1aa362866
2 changed files with 64 additions and 6 deletions

View File

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