Class WebSocketClosedException
The exception that is thrown when the WebSocket session is closed by Discord.
public class WebSocketClosedException : Exception, ISerializable
- Inheritance
-
WebSocketClosedException
- Implements
- Inherited Members
Constructors
WebSocketClosedException(int, string)
Initializes a new instance of the WebSocketClosedException using a Discord close code and an optional reason.
public WebSocketClosedException(int closeCode, string reason = null)
Parameters
Properties
CloseCode
Gets the close code sent by Discord.
public int CloseCode { get; }
Property Value
- int
A close code from Discord.
Reason
Gets the reason of the interruption.
public string Reason { get; }