/// <summary> /// Stop /// </summary> protected override void OnStop() { try { if (_httpServer != null) { // Stop the server. _httpServer.Stop(); _httpServer.Dispose(); } } catch { } _httpServer = null; }
/// <summary> /// Start. /// </summary> /// <param name="args"></param> protected override void OnStart(string[] args) { try { if (_httpServer == null) { // Start the server. _httpServer = new Nequeo.Net.Http.Server(Nequeo.Net.Http.Properties.Settings.Default.HttpStaticBasePath); _httpServer.HttpServer.Name = Nequeo.Net.Http.Service.Program.CommonServerName; _httpServer.HttpServer.Timeout = 30; _httpServer.Start(); } } catch { } }