Home Units Hierarchy Routines All identifiers

Class unaDNSQuery

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaDNSQuery = class(unaObject)

Description

DNS Query/Response

Hierarchy

Overview

Methods

Public constructor create(id: int; const dnsServers, resources: string; qtype: int; opCode, qClass: int; recurse: bool; transport: unaDNS_transport);
Public destructor Destroy(); override;
Protected function issue(transport: unaDNS_transport): bool;
Protected function parse(transport: unaDNS_transport): int;
Protected function readFrom(timeout: int): bool;
Protected procedure reset(doneWithServer: bool);

Properties

Public property AN[rindex:int]: unaDNSRR index 1 read getRR;
Public property AR[rindex:int]: unaDNSRR index 3 read getRR;
Public property dnsServers: unaStringList read f_dnsServers;
Public property id: int read f_id;
Public property NS[rindex:int]: unaDNSRR index 2 read getRR;
Public property opCode: int read f_opCode;
Public property qClass: int read f_qClass;
Public property QD[rindex:int]: unaDNSRR index 0 read getRR;
Public property qtype: int read f_qtype;
Public property req: punaDNS_HDR read f_req;
Public property resources: unaStringList read f_resources;
Public property resp: punaDNS_HDR read f_resp;
Public property respCode: int read f_respCode;
Public property respSize: int read f_respSize;
Public property status: int read f_status;
Protected property timeout: uint64 read f_timeout;

Description

Methods

Public constructor create(id: int; const dnsServers, resources: string; qtype: int; opCode, qClass: int; recurse: bool; transport: unaDNS_transport);

Do not create this object directly, use unaDNSClient instead

Public destructor Destroy(); override;

Releases query resources

Protected function issue(transport: unaDNS_transport): bool;

Sends request to next server from the list and assigns a timeout mark

Protected function parse(transport: unaDNS_transport): int;

Parse response, size of valid data in buffer is already set in respSize

Returns

-3 if data cannot be accepted and retry is possible

Protected function readFrom(timeout: int): bool;

Read response (if any), sets respSize if read was successfull

Parameters
timeout
read timeout
buf
data buffer to fill
bufSize
size of buffer
Returns

True if socket has read something

Protected procedure reset(doneWithServer: bool);

Prepares for next issue().

Properties

Public property AN[rindex:int]: unaDNSRR index 1 read getRR;
 
Public property AR[rindex:int]: unaDNSRR index 3 read getRR;
 
Public property dnsServers: unaStringList read f_dnsServers;
 
Public property id: int read f_id;

Query id. This is same id returned by unaDNSClient.query() method

Public property NS[rindex:int]: unaDNSRR index 2 read getRR;
 
Public property opCode: int read f_opCode;
 
Public property qClass: int read f_qClass;
 
Public property QD[rindex:int]: unaDNSRR index 0 read getRR;
 
Public property qtype: int read f_qtype;
 
Public property req: punaDNS_HDR read f_req;
 
Public property resources: unaStringList read f_resources;
 
Public property resp: punaDNS_HDR read f_resp;
 
Public property respCode: int read f_respCode;

c_DNS_HDR_RCODE_XXX

Public property respSize: int read f_respSize;
 
Public property status: int read f_status;

>0 = status equals some socket error 0 = OK -1 = no respose/timeout -2 = malformed response -3 = internal error

Protected property timeout: uint64 read f_timeout;
 

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09