aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/MainServer.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-21 16:24:17 -0700
committerJohn Hurliman2009-10-21 16:24:17 -0700
commit2b39ff0a39229f1cea513b12e6d093e31c40d0b2 (patch)
tree9b5637ecf48129b025fafec5eeed19c852e13716 /OpenSim/Framework/MainServer.cs
parent* FireQueueEmpty now checks if a measurable amount of time has passed, and if... (diff)
parentFix llParticleSystem to accept LSL variables and LSL constants in place (diff)
downloadopensim-SC-2b39ff0a39229f1cea513b12e6d093e31c40d0b2.zip
opensim-SC-2b39ff0a39229f1cea513b12e6d093e31c40d0b2.tar.gz
opensim-SC-2b39ff0a39229f1cea513b12e6d093e31c40d0b2.tar.bz2
opensim-SC-2b39ff0a39229f1cea513b12e6d093e31c40d0b2.tar.xz
Merged master into prioritization
Diffstat (limited to 'OpenSim/Framework/MainServer.cs')
-rw-r--r--OpenSim/Framework/MainServer.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs
index b5f947e..7da4893 100644
--- a/OpenSim/Framework/MainServer.cs
+++ b/OpenSim/Framework/MainServer.cs
@@ -26,17 +26,36 @@
26 */ 26 */
27 27
28using OpenSim.Framework.Servers.HttpServer; 28using OpenSim.Framework.Servers.HttpServer;
29using System.Collections.Generic;
29 30
30namespace OpenSim.Framework 31namespace OpenSim.Framework
31{ 32{
32 public class MainServer 33 public class MainServer
33 { 34 {
34 private static BaseHttpServer instance; 35 private static BaseHttpServer instance;
36 private static Dictionary<uint, BaseHttpServer> m_Servers =
37 new Dictionary<uint, BaseHttpServer>();
35 38
36 public static BaseHttpServer Instance 39 public static BaseHttpServer Instance
37 { 40 {
38 get { return instance; } 41 get { return instance; }
39 set { instance = value; } 42 set { instance = value; }
40 } 43 }
44
45 public static IHttpServer GetHttpServer(uint port)
46 {
47 if (port == 0)
48 return Instance;
49 if (port == Instance.Port)
50 return Instance;
51
52 if (m_Servers.ContainsKey(port))
53 return m_Servers[port];
54
55 m_Servers[port] = new BaseHttpServer(port);
56 m_Servers[port].Start();
57
58 return m_Servers[port];
59 }
41 } 60 }
42} 61}