ComponentSpace DNS Class Library Reference

DnsClient Class

Sends DNS requests and receives DNS responses using the Domain Name System Protocol (RFC-1034/RFC-1035).

For a list of all members of this type, see DnsClient Members.

System.Object
   ComponentSpace.Dns.DnsClient

[Visual Basic]
Public Class DnsClient
    Implements IDisposable
[C#]
public class DnsClient : IDisposable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The DnsClient constructor specifies the address of the DNS server. If no DNS server address is supplied then the first address returned by DnsServerList is used. Optionally, the ReceiveTimeout may be set.

DNS forward lookups, to resolve a host name to one or more IP addresses, may be performed synchronously (blocking) using Lookup, or asynchronously (non-blocking) using BeginLookup and EndLookup .

DNS reverse lookups, to resolve an IP address to one or more host names, may be performed synchronously using ReverseLookup, or asynchronously using BeginReverseLookup and EndReverseLookup .

You may construct and send your own DNS requests and the receive replies synchronously using Send and Receive, or asynchronously (non-blocking) using BeginSend, EndSend and BeginReceive, EndReceive.

If you're behind a firewall you must ensure outgoing UDP traffic to port 53 (the default DNS port) is permitted.

Requirements

Namespace: ComponentSpace.Dns

Assembly: ComponentSpace.Dns (in ComponentSpace.Dns.dll)

See Also

DnsClient Members | ComponentSpace.Dns Namespace