Example #1
0
 public virtual void Sleep()
 {
     if (ListenerThread != null)
     {
         ListenerThread.Abort();
         ListenerThread = null;
     }
 }
Example #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();
        }
Example #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();
 }