Перейти к основному содержимому

SrvResult

readonly record struct

Represents one _minecraft._tcp SRV record.

Declaration​

public readonly record struct SrvResult
NamespaceMcProtoNet
AssemblyMcProtoNet.dll
Sourcesrc/McProtoNet/Dns/SrvResult.cs#L11 ↗

Constructors​

SignatureDescription
SrvResult(string Target, ushort Port, ushort Priority, ushort Weight)Represents one _minecraft._tcp SRV record.

SrvResult(string, ushort, ushort, ushort)​

public SrvResult(string Target, ushort Port, ushort Priority, ushort Weight)

Represents one _minecraft._tcp SRV record.

Parameters: Target (string), Port (ushort), Priority (ushort), Weight (ushort)

Properties​

SignatureDescription
ushort PortThe TCP port of the server.
ushort PriorityThe RFC 2782 priority.
string TargetThe host name of the server, without the trailing dot.
ushort WeightThe RFC 2782 weight, which is the relative share inside one priority group.

Port​

public ushort Port { get; init; }

The TCP port of the server.

Returns: ushort

Priority​

public ushort Priority { get; init; }

The RFC 2782 priority. Only the records with the lowest value take part in the draw.

Returns: ushort

Target​

public string Target { get; init; }

The host name of the server, without the trailing dot.

Returns: string

Weight​

public ushort Weight { get; init; }

The RFC 2782 weight, which is the relative share inside one priority group.

Returns: ushort