Class SRVRecord
Allows administrators to use several servers for a single domain.
Inherited Members
Namespace: Makaretu.Dns
Assembly: Makaretu.Dns.dll
Syntax
public class SRVRecord : ResourceRecord, IWireSerialiser, ICloneable, IPresentationSerialiser
Constructors
| Improve this Doc View SourceSRVRecord()
Creates a new instance of the SRVRecord class.
Declaration
public SRVRecord()
Properties
| Improve this Doc View SourcePort
The port on this target host of this service.
Declaration
public ushort Port { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt16 |
Priority
The priority of this target host.
Declaration
public ushort Priority { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt16 |
Remarks
A client MUST attempt to contact the target host with the lowest-numbered priority it can reach; target hosts with the same priority SHOULD be tried in an order defined by the weight field.The range is 0-65535.
Target
The domain name of the target host.
Declaration
public DomainName Target { get; set; }
Property Value
| Type | Description |
|---|---|
| DomainName |
Remarks
There MUST be one or more address records for this name, the name MUST NOT be an alias (in the sense of RFC 1034 or RFC 2181).
Weight
A server selection mechanism.
Declaration
public ushort Weight { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt16 |
Remarks
The weight field specifies a relative weight for entries with the same priority.Larger weights SHOULD be given a proportionately higher probability of being selected.
Methods
| Improve this Doc View SourceReadData(PresentationReader)
Read the textual representation of the data that is specific to the resource record Type.
Declaration
public override void ReadData(PresentationReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| PresentationReader | reader | The source of the resource record's data. |
Overrides
Remarks
Derived classes must implement this method.
ReadData(WireReader, Int32)
Read the data that is specific to the resource record Type.
Declaration
public override void ReadData(WireReader reader, int length)
Parameters
| Type | Name | Description |
|---|---|---|
| WireReader | reader | The source of the resource record's data. |
| Int32 | length | The length, in bytes, of the data. |
Overrides
Remarks
Derived classes must implement this method.
WriteData(PresentationWriter)
Write the textual representation of the data that is specific to the resource record.
Declaration
public override void WriteData(PresentationWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| PresentationWriter | writer | The destination for the resource record's data. |
Overrides
Remarks
Derived classes should implement this method.
By default, this will write the hex encoding of the GetData() preceeded by "#" and the number integer bytes.
WriteData(WireWriter)
Write the data that is specific to the resource record Type.
Declaration
public override void WriteData(WireWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| WireWriter | writer | The destination for the DNS object's data. |
Overrides
Remarks
Derived classes must implement this method.