Exemplo n.º 1
0
        TelnetConnection tc = null;//Instancia vacía TELNET

        #endregion Variables_Instancias


        #region MétodoObtenerIP

        public void ObtenerIP(String Name)
        {
            if (tc == null)
            {
                tc = new TelnetConnection(Name);
                string s = tc.Login(US, PW, 100);
                String c = s.TrimEnd();
                c = s.Substring(c.Length - 1, 1);

                if (c != "$" && c != ">")
                {
                    tc.TelnetClose();
                }
            }
        }
Exemplo n.º 2
0
 public void Close()
 {
     tc.TelnetClose();
     tc = null;
 }