Example #1
0
        /// <summary>
        /// Stops the discovery.
        /// </summary>
        public void StopDiscovery()
        {
            Stopped = true;
            RetryTimer?.Dispose();
            RetryTimer = null;

            foreach (var udpClient in UdpSendClients)
            {
                udpClient.Close();
            }
        }
Example #2
0
 public void Stop()
 {
     try
     {
         RetryTimer.Dispose();
         NetworkClient.Close();
     }
     catch
     {
     }
 }
Example #3
0
        /// <summary>
        /// Stops the discovery.
        /// </summary>
        public void StopDiscovery()
        {
            Stopped = true;

            if (UdpClient != null)
            {
                UdpClient.Close();
                UdpClient = null;
            }

            if (RetryTimer != null)
            {
                RetryTimer.Dispose();
                RetryTimer = null;
            }
        }