// 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);
        }
 public ResolveState(string host, DnsLookupCallback callback)
 {
     hostName      = host;
     this.callback = callback;
 }