Ejemplo n.º 1
0
        /// <summary>
        /// Reconnects the Rates Service
        /// </summary>
        public void Reconnect()
        {
            Console.Out.WriteLine("RateServiceExample: Reconnecting......");

            // If we are already connected, then disconnect
            if (_rateService.IsConnected() == true)
            {
                _rateService.Disconnect();
            }

            // Sleep a few seconds so we do not hit the Rates Service with constant reconnecting
            Thread.Sleep(5000);

            // Reconnect to the Rates Service with the same parameters
            _rateService.Connect(_host, _port, _key);
        }