DNS Class

Properties   Methods   Events   Configuration Settings   Errors  

The DNS class is used to query DNS for record information.

Syntax

DNS

Remarks

The DNS class queries a DNS server for records as specified in RFC 1035 and other relevant RFCs. The class property QueryType indicates the record to be queried. Calling Query will initiate the query.

Once the query is complete, a single Response event will fire and the record properties will be filled. StatusCode is the server's success or fail code, and Status is a standard string interpretation of the code.

The records are contained in the Records properties. The programming interface is designed to allow a full walk of the records in the DNS response, including provisions for handling new record types.

The class operates synchronously by default (waits for a response before returning control to the caller), however, the class may also operate asynchronously (return control immediately), by setting Timeout to 0. Please refer to the Timeout property for more information.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

DNSPortThe port to connect to on the DNS Server.
DNSServerThe address of the DNS server.
IdleThe current status of the class.
LocalHostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
ProtocolThe protocol used for the DNS request.
QueryTypeThe record type to query.
RecordCountThe number of records in the Record arrays.
RecordDomainThis property contains the domain name associated with the selected response record, at RecordIndex .
RecordFieldCountThis property contains the number of properties in the current record.
RecordFieldIndexThis property contains the index of the selected property of the current record.
RecordFieldNameThis property contains the name of the property selected by FieldIndex .
RecordFieldValueThis property contains the value of the property selected by FieldIndex .
RecordDataThis property contains the full record data as received from the DNS server.
RecordTypeThis property contains the record type.
RecordTypeNameThis property contains the string representation of the current record type defined by RecordType .
RecordTTLThis property contains the record Time To Live (TTL) value.
RecordSourceThe source of records provided in the Records properties.
RecursiveDetermines whether to ask the DNSServer to recursively query other servers.
RequestIdThe ID of the current DNS request.
StatusA standard string interpretation of StatusCode .
StatusCodeThe success or error code for the DNS query.
TimeoutA timeout for the class.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting.
DoEventsProcesses events from the internal message queue.
GetFieldValueGet the value of the field indicated from a record.
InterruptInterrupt the current method.
QueryQuery a Domain.
ResetReset the class.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

ErrorInformation about errors during data delivery.
ResponseFires after a DNS query.
SSLServerAuthenticationFires when connecting to the server.
SSLStatusShows the progress of the secure connection.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

DoHMethodSpecifies the DNS over HTTPS method.
ResponseTruncatedWhether the response is truncated.
UseDNSAPIDLLWhether to use the system dnsapi.dll on Windows Systems.
UseIDNsWhether to encode hostnames to internationalized domain names.
CaptureIPPacketInfoUsed to capture the packet information.
DestinationAddressUsed to get the destination address from the packet information.
DontFragmentUsed to set the Don't Fragment flag of outgoing packets.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the class binds.
MaxPacketSizeThe maximum length of the packets that can be received.
QOSDSCPValueUsed to specify an arbitrary QOS/DSCP setting (optional).
QOSTrafficTypeUsed to specify QOS/DSCP settings (optional).
ShareLocalPortIf set to True, allows more than one instance of the class to be active on the same local port.
UseConnectionDetermines whether to use a connected socket.
UseIPv6Whether or not to use IPv6.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 Qt Edition - Version 20.0 [Build 8307]