コード例 #1
0
ファイル: WebServerBase.cs プロジェクト: git-thinh/limada
 public virtual void Sleep()
 {
     if (ListenerThread != null)
     {
         ListenerThread.Abort();
         ListenerThread = null;
     }
 }
コード例 #2
0
        /// <summary>
        /// Stops the Proxy Server, removes the Windows proxy settings, and cleans up the thread.
        /// </summary>
        public void Stop()
        {
            // remove the proxy
            this.SetProxy(false);

            //stop listening for incoming connections
            Listener.Stop();

            //wait for server to finish processing current connections...
            ListenerThread.Abort();
            ListenerThread.Join();
        }
コード例 #3
0
 private void SafeExit()
 {
     if (PulseThread != null)
     {
         if (PulseThread.IsAlive)
         {
             PulseThread.Abort();
         }
     }
     if (ListenerThread != null)
     {
         if (ListenerThread.IsAlive)
         {
             ListenerThread.Abort();
         }
     }
     Process.GetCurrentProcess().Kill();
     Application.Exit();
 }