Description | Hierarchy | Fields | Methods | Properties |
type unaDNSQuery = class(unaObject)
DNS Query/Response
constructor create(id: int; const dnsServers, resources: string; qtype: int; opCode, qClass: int; recurse: bool; transport: unaDNS_transport); |
|
destructor Destroy(); override; |
|
function issue(transport: unaDNS_transport): bool; |
|
function parse(transport: unaDNS_transport): int; |
|
function readFrom(timeout: int): bool; |
|
procedure reset(doneWithServer: bool); |
property AN[rindex:int]: unaDNSRR index 1 read getRR; |
|
property AR[rindex:int]: unaDNSRR index 3 read getRR; |
|
property dnsServers: unaStringList read f_dnsServers; |
|
property id: int read f_id; |
|
property NS[rindex:int]: unaDNSRR index 2 read getRR; |
|
property opCode: int read f_opCode; |
|
property qClass: int read f_qClass; |
|
property QD[rindex:int]: unaDNSRR index 0 read getRR; |
|
property qtype: int read f_qtype; |
|
property req: punaDNS_HDR read f_req; |
|
property resources: unaStringList read f_resources; |
|
property resp: punaDNS_HDR read f_resp; |
|
property respCode: int read f_respCode; |
|
property respSize: int read f_respSize; |
|
property status: int read f_status; |
|
property timeout: uint64 read f_timeout; |
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 |
destructor Destroy(); override; |
|
Releases query resources |
function issue(transport: unaDNS_transport): bool; |
|
Sends request to next server from the list and assigns a timeout mark |
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 |
function readFrom(timeout: int): bool; |
|
Read response (if any), sets respSize if read was successfull
Parameters
ReturnsTrue if socket has read something |
procedure reset(doneWithServer: bool); |
|
Prepares for next issue(). |
property AN[rindex:int]: unaDNSRR index 1 read getRR; |
|
property AR[rindex:int]: unaDNSRR index 3 read getRR; |
|
property dnsServers: unaStringList read f_dnsServers; |
|
property id: int read f_id; |
|
Query id. This is same id returned by unaDNSClient.query() method |
property NS[rindex:int]: unaDNSRR index 2 read getRR; |
|
property opCode: int read f_opCode; |
|
property qClass: int read f_qClass; |
|
property QD[rindex:int]: unaDNSRR index 0 read getRR; |
|
property qtype: int read f_qtype; |
|
property req: punaDNS_HDR read f_req; |
|
property resources: unaStringList read f_resources; |
|
property resp: punaDNS_HDR read f_resp; |
|
property respCode: int read f_respCode; |
|
c_DNS_HDR_RCODE_XXX |
property respSize: int read f_respSize; |
|
property status: int read f_status; |
|
>0 = status equals some socket error 0 = OK -1 = no respose/timeout -2 = malformed response -3 = internal error |
property timeout: uint64 read f_timeout; |
|
(c) 2012 Lake of Soft