Ejemplo n.º 1
0
        // Determine the Internet Protocol (IP) addresses for
        // this host asynchronously.
        public void DoGetHostEntryAsync(string hostname, DnsLookupCallback callback)
        {
            GetHostEntryFinished.Reset();
            ResolveState ioContext = new ResolveState(hostname, callback);

            Dns.BeginResolve(ioContext.host,
                             new AsyncCallback(GetHostEntryCallback), ioContext);
        }
Ejemplo n.º 2
0
 public ResolveState(string host, DnsLookupCallback callback)
 {
     hostName      = host;
     this.callback = callback;
 }