Class ConnectionStatusReading
One reading of cli_connection_status: ValheimCLI replies OK: connectionStatus=ErrorVersion, server=...
(its console twin adds gameState=... before server=). The command is a diagnostic, so ValheimCLI answers
it even while its standing expectations fail.
public sealed record ConnectionStatusReading
- Inheritance
-
objectConnectionStatusReading
Constructors
ConnectionStatusReading(GameConnectionStatus, string)
One reading of cli_connection_status: ValheimCLI replies OK: connectionStatus=ErrorVersion, server=...
(its console twin adds gameState=... before server=). The command is a diagnostic, so ValheimCLI answers
it even while its standing expectations fail.
public ConnectionStatusReading(GameConnectionStatus Status, string Server)
Parameters
StatusGameConnectionStatusServerstring
Properties
Code
The game's number for Status, the error code a refusing server sends.
public int Code { get; }
Property Value
- int
Server
public string Server { get; init; }
Property Value
- string
Status
public GameConnectionStatus Status { get; init; }
Property Value
Methods
IsRefusal(GameConnectionStatus)
Whether status is one a refused or failed connection ends with (every Error... status).
public static bool IsRefusal(GameConnectionStatus status)
Parameters
statusGameConnectionStatus
Returns
- bool
Parse(IEnumerable<string>)
Parses the reply; refuses a missing or repeated status line and a status name this game build does not have.
public static ConnectionStatusReading Parse(IEnumerable<string> output)
Parameters
outputIEnumerable<string>
Returns
ParseStatus(string)
A status by the game's name (ErrorVersion); numbers and unknown names are refused.
public static GameConnectionStatus ParseStatus(string name)
Parameters
namestring
Returns
Read(GameActor)
Reads the game's connection status once (read-only).
public static ConnectionStatusReading Read(GameActor actor)
Parameters
actorGameActor
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.