Internet Direct (Indy) Version 9.0.1 Beta
TResultRecord
Collection item used to represent resource records returned by a DNS query.

TResultRecord = class(TCollectionItem)
Description
TResultRecord is a TCollectionItem descendant that represents resource records returned in the results for a DNS query. TResultRecord contains data associated with names, aliases, and internet addresses in the tree-structured Domain Name Space.

Resource records are returned in the Answer, Authority, and Additional sections of a DNS response, and they all share the same format: a variable number of resource records, where the number of records is specified in the corresponding count field in the header.

A resource record has the following format:

  +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  |                                               |
  .                                               .
  .                      NAME                     .
  .                                               .
  |                                               |
  +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  |                      TYPE                     |
  +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  |                     CLASS                     |
  +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  |                      TTL                      |
  |                                               |
  +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  |                    RDLENGTH                   |
  +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|
  .                                               .
  .                     RDATA                     .
  .                                               .
  +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  

TResultRecord provides properties that represent the values found in a resource record, including the resource record type, resource class, Time-To-Live, data for the resource record, and the length of data in the resource record.

TResultRecord also provides methods to handle parsing of raw data from a DNS query response, and storing the resulting values in properties for the object instance.

TResultRecord is also an ancestor class for other resource record types such as TARecord, TCNRecord, THINFORecord, TMINFORecord, TMXRecord, TNAMERecord, TNSRecord, TPTRRecord, TRDATARecord, TSOARecord, TTextRecord, and TWKSRecord. These descendant classes provide additional properties used for labels in the RDATA field that are specific to the resource class and resource record type.

TResultRecord is the type used to represent collection items maintained in the TQueryResult collection, and the item class returned when accessing the resource records returned by a DNS query in TIdDNSResolver.QueryResult.Items.