コード例 #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (waveSocket != null)
         {
             waveSocket.Dispose();
         }
         if (waveDataproc != null)
         {
             waveDataproc.Dispose();
         }
         if (StartRcvEvent != null)
         {
             StartRcvEvent.Dispose();
         }
         if (StartRcvEvent != null)
         {
             StartRcvEvent.Dispose();
         }
         if (RcvThread != null)
         {
             RcvThread.Abort();
             RcvThread = null;
         }
         IsBuilded   = false;
         IsStopRcved = true;
         linkbuffer.Clear();
         Console.WriteLine(@"关闭UDP线程...");
     }
 }
コード例 #2
0
        public virtual void Dispose()
        {
            try { RcvThread.Abort(); }
            catch { }

            try { SendThread.Abort(); }
            catch { }

            _newRcvTelegram.Dispose();
            _newSendTelegram.Dispose();
            _newSendNotifyTelegram.Dispose();
        }
コード例 #3
0
 public void StopReceiveData()
 {
     StartRcvEvent.Reset();
     RcvThread.Abort();
 }