Class DnsSrv
DNS messages for SRV lookups, as RFC 1035 lays them out: a query for one name, and the SRV records of its answer.
Inherited Members
Namespace: Uniform.Matrix.Protocol.Server
Assembly: Uniform.Matrix.Protocol.Server.dll
Syntax
public static class DnsSrv
Methods
| Edit this page View SourceBuildQuery(ushort, string)
Return a recursive query for the SRV records of name, e.g. _matrix-fed._tcp.example.org.
Declaration
public static byte[] BuildQuery(ushort id, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | id | Query ID, which the answer repeats. |
| string | name | Domain name; labels of 1 to 63 bytes. |
Returns
| Type | Description |
|---|---|
| byte[] |
ParseAnswer(ReadOnlySpan<byte>, ushort)
Return the SRV records of an answer to query id, best first: by priority, then weight; empty when the name has none or does not exist, null when the message is not a usable answer.
Declaration
public static IReadOnlyList<SrvRecord>? ParseAnswer(ReadOnlySpan<byte> message, ushort id)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<byte> | message | |
| ushort | id |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<SrvRecord> |