Skip to main content
Version: 4.x

DarkWS.Client.DarkWsConnectionException

DarkWS.Client​

DarkWS.Client​

DarkWsConnectionException Class​

A socket or connection lifecycle failure.

public sealed class DarkWsConnectionException : System.Exception

Inheritance System.Object → System.Exception → DarkWsConnectionException

Constructors​

DarkWsConnectionException(string, Nullable<WebSocketCloseStatus>, string, Exception) Constructor​

Creates a connection failure. Avoid sensitive content in the supplied message or cause.

public DarkWsConnectionException(string message, System.Nullable<System.Net.WebSockets.WebSocketCloseStatus> closeStatus=null, string? closeReason=null, System.Exception? innerException=null);

Parameters​

message System.String

closeStatus System.Nullable<System.Net.WebSockets.WebSocketCloseStatus>

closeReason System.String

innerException System.Exception

Properties​

DarkWsConnectionException.CloseReason Property​

Peer-provided close reason. May contain application data; excluded from Message.

public string? CloseReason { get; }

Property Value​

System.String

DarkWsConnectionException.CloseStatus Property​

Peer close status, when available.

public System.Nullable<System.Net.WebSockets.WebSocketCloseStatus> CloseStatus { get; }

Property Value​

System.Nullable<System.Net.WebSockets.WebSocketCloseStatus>