Table of Contents

Class ConnectionStatus

Namespace
Nyra.Entities
Assembly
Nyra.dll

The node's own outbound network health, from GET /v4/connection or pushed through ConnectionStatusEvent.

public sealed record ConnectionStatus : IEquatable<ConnectionStatus>
Inheritance
ConnectionStatus
Implements
Inherited Members

Remarks

Unrelated to any guild's voice connection. NodeLink only.

Properties

Metrics

Raw speed-test, DNS, ping and local network-interface metrics, shape varies with which checks ran.

[JsonPropertyName("metrics")]
[JsonInclude]
public JsonElement? Metrics { get; }

Property Value

JsonElement?

Remarks

Null when Status is Disabled.

Reason

Machine-readable reason for the disabled state.

[JsonPropertyName("reason")]
[JsonInclude]
[JsonConverter(typeof(NullableTolerantStringConverter))]
public string? Reason { get; }

Property Value

string

Remarks

Only present when Status is Disabled. A token that is not a string reads as null instead of failing the whole frame.

Status

The connection quality the node reports.

[JsonPropertyName("status")]
[JsonInclude]
public ConnectionQuality Status { get; }

Property Value

ConnectionQuality

Remarks

A null token reads as Unknown, the same degradation an absent member and an unknown string already get, so a server that pushes a null status mid-degradation keeps its frame alive instead of losing it whole.

Methods

Equals(ConnectionStatus?)

Indicates whether the statuses report the same quality and reason.

public bool Equals(ConnectionStatus? other)

Parameters

other ConnectionStatus

The status to compare with.

Returns

bool

Whether the statuses are equal, metrics compared by content.

GetHashCode()

Returns the hash code of the status.

public override int GetHashCode()

Returns

int

A hash of the status and reason, the metrics stay out of it.