Example #1
0
		private void StopHttpServer()
		{
			if (_httpServer != null)
			{
				try
				{
					_httpServer.Stop();
					_httpServer = null;
				}
				catch (Exception e)
				{
					log.ErrorFormat("Error stopping http server: {0}", e);
				}
			}
		}
Example #2
0
		private void StartHttpServer()
		{
			if (httpPortNumber != 0)
			{
				try
				{
					_httpServer = new HttpServer(httpPortNumber, this);
					_httpServer.Start();
				}
				catch (Exception e)
				{
					log.ErrorFormat("Error initializing http server: {0}", e);
				}
			}
		}