Description | Hierarchy | Fields | Methods | Properties |
type unaDNSClient = class(unaThread)
DNS Client
constructor Create(const dnsServers: string = ''; transport: unaDNS_transport = unaDnsTR_UDP_then_TCP); |
|
destructor Destroy(); override; |
|
class function getDNSServersList(): string; |
|
function query(const dnsServers, resources: string; qtype: int = c_DNS_TYPE_A; opCode: int = c_DNS_HDR_OPCODE_QUERY; qClass: int = c_DNS_CLASS_IN; recurse: bool = true): int; overload; |
|
function query(const resources: string; qtype: int = c_DNS_TYPE_A; opCode: int = c_DNS_HDR_OPCODE_QUERY; qClass: int = c_DNS_CLASS_IN; recurse: bool = true): int; overload; |
|
function execute(threadID: unsigned): int; override; |
|
function push(query: unaDNSQuery): int; |
|
procedure onAnswer(query: unaDNSQuery); virtual; |
|
procedure pop(query: unaDNSQuery; onError: bool); |
property dnsServers: string read f_dnsServers; |
|
property transport: unaDNS_transport read f_transport write f_transport; |
constructor Create(const dnsServers: string = ''; transport: unaDNS_transport = unaDnsTR_UDP_then_TCP); |
|
Creates DNS client with default servers list (by default it is empty, in which case it will be filled by calling getDNSServersList() method) |
destructor Destroy(); override; |
|
Releases (hopefully) all resources. |
class function getDNSServersList(): string; |
|
ReturnsList of configured DNS servers, separated by #13#10 |
function query(const dnsServers, resources: string; qtype: int = c_DNS_TYPE_A; opCode: int = c_DNS_HDR_OPCODE_QUERY; qClass: int = c_DNS_CLASS_IN; recurse: bool = true): int; overload; |
|
Returnsquery ID, which should be tracked in onAnswer() method |
function query(const resources: string; qtype: int = c_DNS_TYPE_A; opCode: int = c_DNS_HDR_OPCODE_QUERY; qClass: int = c_DNS_CLASS_IN; recurse: bool = true): int; overload; |
|
Uses DNS servers specified in constructor. Returnsquery ID, which should be tracked in onAnswer() method |
function execute(threadID: unsigned): int; override; |
|
// |
function push(query: unaDNSQuery): int; |
|
Returnsquery id |
procedure onAnswer(query: unaDNSQuery); virtual; |
|
Override to receive answers. Parameters
|
procedure pop(query: unaDNSQuery; onError: bool); |
|
Returnsquery id |
property dnsServers: string read f_dnsServers; |
|
DNS server list, specified in constructor. Could be empty. |
property transport: unaDNS_transport read f_transport write f_transport; |
|
Transport to use. |
(c) 2012 Lake of Soft