diff options
author | Melanie | 2009-09-28 22:48:57 +0100 |
---|---|---|
committer | Melanie | 2009-09-28 22:48:57 +0100 |
commit | a1aa362866fc59d331780ac799beee4a6d2613c6 (patch) | |
tree | 61b52240126221a612c22d155ce9446359b503fd /OpenSim/Server/Base/HttpServerBase.cs | |
parent | Bump main version to 0.6.8-Dev (diff) | |
download | opensim-SC_OLD-a1aa362866fc59d331780ac799beee4a6d2613c6.zip opensim-SC_OLD-a1aa362866fc59d331780ac799beee4a6d2613c6.tar.gz opensim-SC_OLD-a1aa362866fc59d331780ac799beee4a6d2613c6.tar.bz2 opensim-SC_OLD-a1aa362866fc59d331780ac799beee4a6d2613c6.tar.xz |
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
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Server/Base/HttpServerBase.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs index 791e1ef..6a1f37c 100644 --- a/OpenSim/Server/Base/HttpServerBase.cs +++ b/OpenSim/Server/Base/HttpServerBase.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.Threading; | 30 | using System.Threading; |
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
@@ -45,12 +46,27 @@ namespace OpenSim.Server.Base | |||
45 | // The http server instance | 46 | // The http server instance |
46 | // | 47 | // |
47 | protected BaseHttpServer m_HttpServer = null; | 48 | protected BaseHttpServer m_HttpServer = null; |
49 | protected uint m_Port = 0; | ||
50 | protected Dictionary<uint, BaseHttpServer> m_Servers = | ||
51 | new Dictionary<uint, BaseHttpServer>(); | ||
48 | 52 | ||
49 | public IHttpServer HttpServer | 53 | public IHttpServer HttpServer |
50 | { | 54 | { |
51 | get { return m_HttpServer; } | 55 | get { return m_HttpServer; } |
52 | } | 56 | } |
53 | 57 | ||
58 | public IHttpServer GetHttpServer(uint port) | ||
59 | { | ||
60 | if (port == m_Port) | ||
61 | return HttpServer; | ||
62 | |||
63 | if (m_Servers.ContainsKey(port)) | ||
64 | return m_Servers[port]; | ||
65 | |||
66 | m_Servers[port] = new BaseHttpServer(port); | ||
67 | return m_Servers[port]; | ||
68 | } | ||
69 | |||
54 | // Handle all the automagical stuff | 70 | // Handle all the automagical stuff |
55 | // | 71 | // |
56 | public HttpServerBase(string prompt, string[] args) : base(prompt, args) | 72 | public HttpServerBase(string prompt, string[] args) : base(prompt, args) |
@@ -74,6 +90,8 @@ namespace OpenSim.Server.Base | |||
74 | Thread.CurrentThread.Abort(); | 90 | Thread.CurrentThread.Abort(); |
75 | } | 91 | } |
76 | 92 | ||
93 | m_Port = port; | ||
94 | |||
77 | m_HttpServer = new BaseHttpServer(port); | 95 | m_HttpServer = new BaseHttpServer(port); |
78 | 96 | ||
79 | MainServer.Instance = m_HttpServer; | 97 | MainServer.Instance = m_HttpServer; |