Esempio n. 1
0
        /// <summary>
        ///  <see cref="IClient.Stop"/>
        /// </summary>
        private void Stop()
        {
            if (this.uworker != null)
            {

                this.uworker.Recive -= this.OnRecived;
                this.uworker.Timeout -= this.OnTimeout;
                this.uworker.StopWorking();
                this.uworker = null;
            }
        }
Esempio n. 2
0
 public void StopAsyncRecive()
 {
     if (this.uworker != null)
     {
         //Stops the worker threads.
         this.uworker.Recive -= this.OnRecived;
         this.uworker.Timeout -= this.OnTimeout;
         this.uworker.StopWorking();
         this.uworker = null;
     }
 }
Esempio n. 3
0
        /// <summary>
        ///  <see cref="IClient.Start"/>
        /// </summary>
        private void Start()
        {
            if (uworker != null)
                return; //We are already receiving.

            //Creates new workers and threads using them.

            this.uworker = new UdpWorker(this.connection);
            uworker.Recive += this.OnRecived;
            uworker.Timeout += this.OnTimeout;

            new Thread(uworker.DoWork).Start();
        }
Esempio n. 4
0
        public void StartAsyncRecive()
        {
            if (uworker != null)
                return; //We are already receiving.

            //New worker objects are created and started.

            this.uworker = new UdpWorker(this);
            uworker.Recive += this.OnRecived;
            uworker.Timeout += this.OnTimeout;

            new Thread(uworker.DoWork).Start();
        }