/// <summary> /// stop HTTP Localhost /// </summary> public void Stop() { if (_http == null) { return; } // method to wait for still running events before shutdown //new Thread(new ThreadStart(delegate () //{ // // Wait a few seconds and if threads are not terminated, kill the process // for (int i = 0; i < 20; i++) // { // Thread.Sleep(100); // if (_http == null) // return; // } // Process.GetCurrentProcess().Kill(); //})).Start(); _http.Stop(); _http = null; IsRunning = false; }
private void StartHttpServer() { if (_http != null) { return; } _http = new PersonalAnalyticsHttp(); _http.Start(); }
private void StartHttpServer() { if (_http != null) return; _http = new PersonalAnalyticsHttp(); _http.Start(); }
/// <summary> /// stop HTTP Localhost /// </summary> public void Stop() { if (_http == null) return; // method to wait for still running events before shutdown //new Thread(new ThreadStart(delegate () //{ // // Wait a few seconds and if threads are not terminated, kill the process // for (int i = 0; i < 20; i++) // { // Thread.Sleep(100); // if (_http == null) // return; // } // Process.GetCurrentProcess().Kill(); //})).Start(); _http.Stop(); _http = null; IsRunning = false; }