Class NodeReadyEventArgs
A node finished its ready handshake.
public sealed class NodeReadyEventArgs : EventArgs
- Inheritance
-
NodeReadyEventArgs
- Inherited Members
Properties
Resumed
Whether the node is running a resumed session.
[JsonPropertyName("resumed")]
[JsonInclude]
[JsonConverter(typeof(NullableTolerantBooleanConverter))]
public bool? Resumed { get; }
Property Value
- bool?
Remarks
The server's claim confirmed against the session id the connection replayed. A claim the cross-check could not confirm reads as false here, the safe direction. A missing claim reads as null on this member, but the raised event's Resumed is always a decided value because the node applies the verdict before raising.
The raw claim as sent travels in ServerClaimedResume, callers hardening against a
server that sends none read ?? false.
ServerClaimedResume
The resume claim exactly as the server sent it.
[JsonIgnore]
public bool? ServerClaimedResume { get; }
Property Value
- bool?
Remarks
Not a verified fact, a lying server can claim a resume it did not grant, the node's own verdict is Resumed. Null when the frame carried no readable value, a numeric one or zero and the strings "true"/"false" also read, anything else reads as null.
SessionId
The node session id, not a Discord voice session id.
[JsonPropertyName("sessionId")]
[JsonInclude]
[JsonConverter(typeof(NullableTolerantStringConverter))]
public string SessionId { get; }
Property Value
Remarks
Real servers always send a string. A server that sends null or a non-string token
overwrites the Empty default with null despite the annotation.
The getter absorbs it and never hands out null, so an absent or nulled id reads as the empty string. The
raised event carries the sanitized id the node can actually use (the node drops one no HTTP layer would
accept), and Node.SessionId is the source of truth for what the session really is.