Indy 9
TRDATARecord
Hierarchy, Properties, Methods, See Also, Unit: IdDNSResolver
Represents a resource record returned from a DNS query that includes Host Address record types.
TRDATARecord = class(TResultRecord)
Unit
IdDNSResolver
Description
TRDATARecord is a TResultRecord descendant that represents a resource record returned in the results for a DNS query. TRDATARecord is the collection item created to represent a resource resource returned when TIDNSResolver.QueryRecords includes the value qtA for host address resource records.

TRDATARecord is also the ancestor for the more specialized resource record represented in TARecord.

TRDATARecord implements additional properties and the Parse method, that allow access to the most common form of resource record: a resource record that contains an IP Address in the RData property.

TRDATARecord also implements the Assign method to allow assignment of property values that are copied from another collection item.


TRDATARecord.IPAddress
TRDATARecord
Represents an IP address that occurs in the RData field for the resource record.
property IPAddress: string;
Description
IPAddress is a read-only String property that represents an IP address expressed in dotted-decimal form that occurs in the RData field for the resource record.

TRDATARecord.Assign
TRDATARecord
Copies property values into the current object instance.
procedure Assign(Source: TPersistent); override;
Parameters
Source: TPersistent
Collection item contain value to be copied.
Description
Assign is a procedure that copies the property values from a collection item specified in ASource to the current object instance. If ASource has the same class type as the current object instance, the required properties are copied. Otherwise the inherited Assign method is called using ASource as an argument.

TRDATARecord.Create
TRDATARecord
Constructor for the object instance.
constructor Create(Collection: TCollection); override;
Parameters
Collection: TCollection
Owner of the collection item.
Description
Create is the constructor for the object instance. Create calls the inherited Create method using Collection as the owner of the collection item.

TRDATARecord.Parse
TRDATARecord
Parses RData values into properties.
procedure Parse(CompleteMessage: String; APos: Integer); override;
Parameters
CompleteMessage: String
Contents of the resource record.
APos: Integer
Position where RData values begin in the answer.
Description
Parse is an overridden procedure that implements a routine to parse resource record values in the DNS response into their property-based counterparts.

CompleteMessage is the contents of the resource record. Since the DNS message can contain compressed data, the whole message is needed for parsing and pointer location.

APos is the position in the resource record where RData values for this record type are located in the DNS Answer.

Parse calls the inherited Parse method, and retrieves the DNS labels and values for the IPAddress property.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.