Esempio n. 1
0
        public GkStatusPort(int pConnectionTimeout)
        {
            var _gkTelnetIp   = IniFileIO.GetKey("Gatekeeper::Main", "Home", "127.0.0.1");
            var _gkTelnetPort = IniFileIO.GetKey("Gatekeeper::Main", "StatusPort", "7000");

            ipEndPoint = new IPEndPoint(IPAddress.Parse(_gkTelnetIp), int.Parse(_gkTelnetPort));
            connect(true, pConnectionTimeout);
        }
Esempio n. 2
0
        public GkStatusPort(LogDelegate pLog)
        {
            log = pLog;
            var _gkTelnetIp   = IniFileIO.GetKey("Gatekeeper::Main", "Home", "127.0.0.1");
            var _gkTelnetPort = IniFileIO.GetKey("Gatekeeper::Main", "StatusPort", "7000");

            ipEndPoint = new IPEndPoint(IPAddress.Parse(_gkTelnetIp), int.Parse(_gkTelnetPort));
            connect(true, DEFAULT_CONNECTION_TIMEOUT);
        }
Esempio n. 3
0
        /// <summary>
        /// opens telnet connection
        /// </summary>
        /// <param name="pConnectTimeout">seconds</param>
        /// <param name="pReceiveTimeout">seconds</param>
        public GkStatusPortEx(int pConnectTimeout, int pReceiveTimeout)
        {
            var _gkTelnetIp   = IniFileIO.GetKey("Gatekeeper::Main", "Home", "127.0.0.1");
            var _gkTelnetPort = IniFileIO.GetKey("Gatekeeper::Main", "StatusPort", "7000");

            ipEndPoint = new IPEndPoint(IPAddress.Parse(_gkTelnetIp), int.Parse(_gkTelnetPort));

            connectSleepTimeCounter = (pConnectTimeout * 1000) / SLEEP_TIME_SLICE;
            receiveSleepTimeCounter = (pReceiveTimeout * 1000) / SLEEP_TIME_SLICE;

            connect();
        }
Esempio n. 4
0
        virtual public void CompareToIni()
        {
            string iniValue = IniFileIO.GetKey(sectionName, key);

            if (iniValue == string.Empty || iniValue != keyValue)
            {
                throw new ApplicationException("INI inconsistency:\r\n" +
                                               "Section: [" + sectionName + "] \r\n" +
                                               "key: " + key + "\r\n" +
                                               "dbValue : [" + keyValue + "]\r\n" +
                                               "iniValue: [" + iniValue + "]\r\n");
            }
        }