Exemplo n.º 1
0
        public void Connect()
        {
            if (Connected)
            {
                return;
            }

            if (_Connecting)
            {
                if (DateTime.UtcNow - _ConnectingStart > TimeSpan.FromSeconds(30))
                {
                    _Connecting = false;
                }
                return;
            }
            else
            {
                _ConnectingStart = DateTime.UtcNow;
                _Connecting      = true;
            }

            //TODO: Fix TLS support
            var endpoint = CityConfig.Host.Replace("100", "101");

            LOG.Info("Lot server connecting to city server: " + endpoint);
            Client.Connect(endpoint);
        }
Exemplo n.º 2
0
 public void Connect()
 {
     if (Status == GluonHostStatus.DISCONNECTED && InternalHost != null)
     {
         Status = GluonHostStatus.CONNECTING;
         //TODO: TLS
         var endpoint = InternalHost + "101";
         Client.Connect(endpoint);
     }
 }