aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs24
1 files changed, 16 insertions, 8 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index e1ae74e..e243002 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Framework.Servers.HttpServer
113 113
114 protected IPAddress m_listenIPAddress = IPAddress.Any; 114 protected IPAddress m_listenIPAddress = IPAddress.Any;
115 115
116 private PollServiceRequestManager m_PollServiceManager; 116 public PollServiceRequestManager PollServiceRequestManager { get; private set; }
117 117
118 public uint SSLPort 118 public uint SSLPort
119 { 119 {
@@ -374,7 +374,7 @@ namespace OpenSim.Framework.Servers.HttpServer
374 return true; 374 return true;
375 } 375 }
376 376
377 private void OnRequest(object source, RequestEventArgs args) 377 public void OnRequest(object source, RequestEventArgs args)
378 { 378 {
379 RequestNumber++; 379 RequestNumber++;
380 380
@@ -429,7 +429,7 @@ namespace OpenSim.Framework.Servers.HttpServer
429 psEvArgs.Request(psreq.RequestID, keysvals); 429 psEvArgs.Request(psreq.RequestID, keysvals);
430 } 430 }
431 431
432 m_PollServiceManager.Enqueue(psreq); 432 PollServiceRequestManager.Enqueue(psreq);
433 } 433 }
434 else 434 else
435 { 435 {
@@ -1781,10 +1781,17 @@ namespace OpenSim.Framework.Servers.HttpServer
1781 1781
1782 public void Start() 1782 public void Start()
1783 { 1783 {
1784 StartHTTP(); 1784 Start(true);
1785 } 1785 }
1786 1786
1787 private void StartHTTP() 1787 /// <summary>
1788 /// Start the http server
1789 /// </summary>
1790 /// <param name='processPollRequestsAsync'>
1791 /// If true then poll responses are performed asynchronsly.
1792 /// Option exists to allow regression tests to perform processing synchronously.
1793 /// </param>
1794 public void Start(bool performPollResponsesAsync)
1788 { 1795 {
1789 m_log.InfoFormat( 1796 m_log.InfoFormat(
1790 "[BASE HTTP SERVER]: Starting {0} server on port {1}", UseSSL ? "HTTPS" : "HTTP", Port); 1797 "[BASE HTTP SERVER]: Starting {0} server on port {1}", UseSSL ? "HTTPS" : "HTTP", Port);
@@ -1822,8 +1829,9 @@ namespace OpenSim.Framework.Servers.HttpServer
1822 m_httpListener2.Start(64); 1829 m_httpListener2.Start(64);
1823 1830
1824 // Long Poll Service Manager with 3 worker threads a 25 second timeout for no events 1831 // Long Poll Service Manager with 3 worker threads a 25 second timeout for no events
1825 m_PollServiceManager = new PollServiceRequestManager(this, 3, 25000); 1832 PollServiceRequestManager = new PollServiceRequestManager(this, performPollResponsesAsync, 3, 25000);
1826 m_PollServiceManager.Start(); 1833 PollServiceRequestManager.Start();
1834
1827 HTTPDRunning = true; 1835 HTTPDRunning = true;
1828 1836
1829 //HttpListenerContext context; 1837 //HttpListenerContext context;
@@ -1892,7 +1900,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1892 1900
1893 try 1901 try
1894 { 1902 {
1895 m_PollServiceManager.Stop(); 1903 PollServiceRequestManager.Stop();
1896 1904
1897 m_httpListener2.ExceptionThrown -= httpServerException; 1905 m_httpListener2.ExceptionThrown -= httpServerException;
1898 //m_httpListener2.DisconnectHandler = null; 1906 //m_httpListener2.DisconnectHandler = null;