Ejemplo n.º 1
0
        public void StopClient()
        {
            if (!running)
            {
                return;
            }

            running = false;

            if (writeThread != null)
            {
                writeThread.Stop();
                writeThread = null;
            }

            if (readThread != null)
            {
                readThread.Stop();
                readThread = null;
            }

            if (inputCapture != null)
            {
                inputCapture.StopCapturing();
                inputCapture = null;
            }
        }
Ejemplo n.º 2
0
        public void StartClient()
        {
            if (IsRunning)
            {
                return;
            }

            lock (this)
            {
                running = true;
            }

            inputCapture = new InputCapture(this);

            readThread = new ClientReadThread(this);
            writeThread = new ClientWriteThread();

            readThread.Start();
            writeThread.Start();

            inputCapture.StartCapturing();
        }