aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/OSHttpServer.cs
diff options
context:
space:
mode:
authorDr Scofield2008-07-07 09:47:36 +0000
committerDr Scofield2008-07-07 09:47:36 +0000
commit7f0bcc5aa1f7afc0d24734978bfd784ae8ac1558 (patch)
tree1ead06aa0a5c7c7329b17d32509cff086126d99a /OpenSim/Framework/Servers/OSHttpServer.cs
parentAddresses more problem box cut angles (diff)
downloadopensim-SC_OLD-7f0bcc5aa1f7afc0d24734978bfd784ae8ac1558.zip
opensim-SC_OLD-7f0bcc5aa1f7afc0d24734978bfd784ae8ac1558.tar.gz
opensim-SC_OLD-7f0bcc5aa1f7afc0d24734978bfd784ae8ac1558.tar.bz2
opensim-SC_OLD-7f0bcc5aa1f7afc0d24734978bfd784ae8ac1558.tar.xz
further progress on HttpServer integration: OSHttpRequest can now be
instantiated from both .NET and HttpServer code path.
Diffstat (limited to 'OpenSim/Framework/Servers/OSHttpServer.cs')
-rw-r--r--OpenSim/Framework/Servers/OSHttpServer.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/OSHttpServer.cs b/OpenSim/Framework/Servers/OSHttpServer.cs
index aade003..4940101 100644
--- a/OpenSim/Framework/Servers/OSHttpServer.cs
+++ b/OpenSim/Framework/Servers/OSHttpServer.cs
@@ -50,6 +50,8 @@ namespace OpenSim.Framework.Servers
50 { 50 {
51 private static readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 private object _syncObject = new object();
54
53 // underlying HttpServer.HttpListener 55 // underlying HttpServer.HttpListener
54 protected HttpListener _listener; 56 protected HttpListener _listener;
55 // underlying core/engine thread 57 // underlying core/engine thread
@@ -157,16 +159,28 @@ namespace OpenSim.Framework.Servers
157 _pumps[i].Start(); 159 _pumps[i].Start();
158 } 160 }
159 161
162 public void Stop()
163 {
164 lock (_syncObject) Monitor.Pulse(_syncObject);
165 }
166
160 /// <summary> 167 /// <summary>
161 /// Engine keeps the HTTP server running. 168 /// Engine keeps the HTTP server running.
162 /// </summary> 169 /// </summary>
163 private void Engine() 170 private void Engine()
164 { 171 {
165 while (true) 172 try {
166 {
167 _listener.RequestHandler += OnHttpRequest; 173 _listener.RequestHandler += OnHttpRequest;
168 _listener.Start(QueueSize); 174 _listener.Start(QueueSize);
175 _log.InfoFormat("[{0}] HTTP server started", EngineID);
176
177 lock (_syncObject) Monitor.Wait(_syncObject);
178 }
179 catch (Exception)
180 {
169 } 181 }
182
183 _log.InfoFormat("[{0}] HTTP server terminated", EngineID);
170 } 184 }
171 185
172 186