LumiSoft Net Help
Dns_Client Class
NamespacesLumiSoft.Net.DNS.ClientDns_Client
DNS client.
Declaration Syntax
C#Visual BasicVisual C++F#
public class Dns_Client : IDisposable
Public Class Dns_Client
	Implements IDisposable
public ref class Dns_Client : IDisposable
type Dns_Client =  
    class
        interface IDisposable
    end
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
Dns_Client()()()()
Default constructor.

Cache
Gets DNS cache.

CreateTransaction(DNS_QType, String, Int32)
Creates new DNS client transaction.

Dispose()()()()
Cleans up any resources being used.

DnsServers
Gets or sets dns servers.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
GetEmailHosts(String)
Gets email hosts.

GetEmailHostsAsync(Dns_Client..::..GetEmailHostsAsyncOP)
Starts getting email hosts.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetHostAddresses(String)
Gets host IPv4 and IPv6 addresses.

GetHostAddressesAsync(Dns_Client..::..GetHostAddressesAsyncOP)
Starts resolving host IPv4 and IPv6 addresses.

GetHostsAddresses(array<String>[]()[][])
Resolving multiple host IPv4 and IPv6 addresses.

GetHostsAddresses(array<String>[]()[][], Boolean)
Resolving multiple host IPv4 and IPv6 addresses.

GetHostsAddressesAsync(Dns_Client..::..GetHostsAddressesAsyncOP)
Starts resolving multiple host IPv4 and IPv6 addresses.

GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Query(String, DNS_QType)
Queries server with specified query.

Query(String, DNS_QType, Int32)
Queries server with specified query.

Resolve(array<String>[]()[][]) Obsolete.
Resolves host names to IP addresses.

Resolve(String) Obsolete.
Resolves host name to IP addresses.

Static
Gets static DNS client.

ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
UseDnsCache
Gets or sets if to use dns caching.

Examples
 Copy imageCopy
// Optionally set dns servers, by default DNS client uses defaultt NIC DNS servers.
Dns_Client.DnsServers = new string[]{"194.126.115.18"};

Dns_Client dns = Dns_Client.Static;

// Get MX records.
DnsServerResponse resp = dns.Query("lumisoft.ee",QTYPE.MX);
if(resp.ConnectionOk && resp.ResponseCode == RCODE.NO_ERROR){
    MX_Record[] mxRecords = resp.GetMXRecords();

    // Do your stuff
}
else{
    // Handle error there, for more exact error info see RCODE 
}
Inheritance Hierarchy
Object
Dns_Client

Assembly: LumiSoft.Net (Module: LumiSoft.Net.dll) Version: 4.5.5510.19119