Home Units Hierarchy Routines All identifiers

Class unaDNSClient

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaDNSClient = class(unaThread)

Description

DNS Client

Hierarchy

Overview

Methods

Public constructor Create(const dnsServers: string = ''; transport: unaDNS_transport = unaDnsTR_UDP_then_TCP);
Public destructor Destroy(); override;
Public class function getDNSServersList(): string;
Public 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;
Public 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;
Protected function execute(threadID: unsigned): int; override;
Protected function push(query: unaDNSQuery): int;
Protected procedure onAnswer(query: unaDNSQuery); virtual;
Protected procedure pop(query: unaDNSQuery; onError: bool);

Properties

Public property dnsServers: string read f_dnsServers;
Public property transport: unaDNS_transport read f_transport write f_transport;

Description

Methods

Public 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)

Public destructor Destroy(); override;

Releases (hopefully) all resources.

Public class function getDNSServersList(): string;
 
Returns

List of configured DNS servers, separated by #13#10

Public 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;
 
Returns

query ID, which should be tracked in onAnswer() method

Public 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.

Returns

query ID, which should be tracked in onAnswer() method

Protected function execute(threadID: unsigned): int; override;

//

Protected function push(query: unaDNSQuery): int;
 
Returns

query id

Protected procedure onAnswer(query: unaDNSQuery); virtual;

Override to receive answers.

Parameters
query
Protected procedure pop(query: unaDNSQuery; onError: bool);
 
Returns

query id

Properties

Public property dnsServers: string read f_dnsServers;

DNS server list, specified in constructor. Could be empty.

Public property transport: unaDNS_transport read f_transport write f_transport;

Transport to use.

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09