Exemplo n.º 1
0
 private IPAddress[] resolve()
 {
     if (llmnr == null)
     {
         llmnr = new Llmnr();
     }
     if (mdns == null)
     {
         mdns = new Mdns();
     }
     return(NameResolving.ResolveAsync(this.service, 2000, llmnr, mdns).Result);
 }
Exemplo n.º 2
0
 public bool Resolve()
 {
     if (llmnr == null)
     {
         llmnr = new Llmnr();
     }
     if (resolvedIPs == null)
     {
         this.resolvedIPs = NameResolving.ResolveAsync(this.service, 2000, llmnr).Result;
     }
     return(resolvedIPs != null && resolvedIPs.Length > 0);
 }
Exemplo n.º 3
0
 public SshClientWrapper(string service, string IPAddress, ushort port, string username, string password)
 {
     sshClient        = null;
     llmnr            = null;
     connectThread    = null;
     enabled          = false;
     hasConnected     = false;
     lastDisconnected = DateTime.Now.Subtract(TimeSpan.FromSeconds(3));
     this.service     = service;
     this.IPAddress   = IPAddress;
     this.port        = port;
     this.username    = username;
     this.password    = password;
 }
Exemplo n.º 4
0
        public bool Resolve()
        {
            if (llmnr == null)
            {
                llmnr = new Llmnr();
            }

            IPAddress[] addresses = NameResolving.ResolveAsync(this.service, 1000, llmnr).Result;
            if (addresses != null)
            {
                this.resolvedIPs = addresses;
                return(true);
            }
            return(false);
        }
Exemplo n.º 5
0
        public bool Resolve()
        {
            if (llmnr == null)
            {
                llmnr = new Llmnr();
            }

            IPAddress address = NameResolving.ResolveAsync(this.service, 1000, llmnr).Result;

            if (address != null)
            {
                this.IPAddress = address.ToString();
                return(true);
            }
            return(false);
        }