Mono Class Library: System.Net.Dns Overview | MembersSystem.Net.Dns.BeginResolve Method |
Begins the asynchronous execution of a DNS query to resolve a host name or IP address. [Edit]
|
- hostName
- A string containing the DNS name or IP address of the host. [Edit]
- requestCallback
- A AsyncCallback delegate or null . [Edit]
- stateObject
- An application-defined object, or null . [Edit]
A IAsyncResult instance that contains information about the asynchronous operation. [Edit]
Type Reason System.Net.DnsPermission [Edit] Requires unrestricted permission for accessing DNS information. See System.Net.DnsPermission and System.Security.Permissions.PermissionState.Unrestricted.
Type Reason ArgumentNullException hostName is null . [Edit] System.Net.Sockets.SocketException An error was encountered executing the DNS query . [Edit] System.Security.SecurityException The caller does not have permission to access DNS information. [Edit]
This method starts an asynchronous request for DNS information about the specified host. To retrieve the results of the query and release resources allocated by this method, call the Dns.EndResolve(IAsyncResult) method, and specify the IAsyncResult object returned by this method.
Note: The Dns.EndResolve(IAsyncResult) method should be called exactly once for each call to Dns.BeginResolve(string, AsyncCallback, object).If the requestCallback parameter is not null, the method referenced by requestCallback is invoked when the asynchronous operation completes. The IAsyncResult object returned by this method is passed as the argument to the method referenced by requestCallback. The method referenced by requestCallback can retrieve the results of the query by calling Dns.EndResolve(IAsyncResult).
The stateObject parameter can be any object that the caller wishes to have available for the duration of the asynchronous operation. This object is available via the IAsyncResult.AsyncState property of the object returned by this method.
[Edit]
Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0