/// <summary> /// Stop RDPEUDP Client /// </summary> public void Stop() { running = false; if (receiveThread.IsAlive) { receiveThread.Abort(); receiveThread.Join(); } socket.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; }