private void StopHttpServer() { if (_httpServer != null) { try { _httpServer.Stop(); _httpServer = null; } catch (Exception e) { log.ErrorFormat("Error stopping http server: {0}", e); } } }
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); } } }