Beispiel #1
0
        public virtual void wakeup()
        {
            lock (this)
            {
                if (selector != null)
                {
                    selector.Wakeup();
                }

                keepWaiting = false;

                Monitor.Pulse(this);
            }
        }
Beispiel #2
0
 private void openSelector()
 {
     lock (this)
     {
         if (useBlockingOnly)
         {
             selector = null;
         }
         else
         {
             try
             {
                 selector = new Selector();
                 // Selector.open();
                 if (stopRequest)
                 {
                     selector.Wakeup();
                 }
             }
             catch (SocketException)
             {
                 // ignore
             }
         }
     }
 }
Beispiel #3
0
 private void openSelector()
 {
     try
     {
         lock (this)
         {
             selector = new Selector();
             // Selector.open();
             if (stopRequest)
             {
                 selector.Wakeup();
             }
         }
     }
     catch (SocketException)
     {
     // ignore
     }
 }