Пример #1
0
        /// <summary>
        /// Stop this RDPEUDP Server
        /// </summary>
        public void Stop()
        {
            if (!started)
            {
                return;
            }

            receiveThreadCancellationTokenSource.Cancel();

            if (receiveThread.IsAlive)
            {
                receiveThread.Join();
            }
            foreach (IPEndPoint ep in serverSocketDic.Keys)
            {
                serverSocketDic[ep].Close();
            }

            serverSocketDic.Clear();

            udpTransport.Stop();

            unprocessedPacketBuffer.Clear();

            started = false;
        }
 /// <summary>
 /// Stop RDPEUDP Client
 /// </summary>
 public void Stop()
 {
     running = false;
     if (receiveThread.IsAlive)
     {
         receiveThread.Abort();
         receiveThread.Join();
     }
     socket.Close();
     udpTransport.Stop();
 }
Пример #3
0
 /// <summary>
 /// Stop this RDPEUDP Server
 /// </summary>
 public void Stop()
 {
     running = false;
     if (receiveThread.IsAlive)
     {
         receiveThread.Abort();
         receiveThread.Join();
     }
     foreach (IPEndPoint ep in serverSocketDic.Keys)
     {
         serverSocketDic[ep].Close();
     }
     udpTransport.Stop();
 }
        /// <summary>
        /// Stop RDPEUDP Client
        /// </summary>
        public void Stop()
        {
            if (!started)
            {
                return;
            }

            receiveThreadCancellationTokenSource.Cancel();

            if (receiveThread.IsAlive)
            {
                receiveThread.Join();
            }
            socket.Close();
            udpTransport.Stop();

            started = false;
        }