DisconnectionError
Namespace: Signal.Bot
Full Name: Signal.Bot.DisconnectionError
Summary
Represents a disconnection event that occurred during WebSocket communication. Contains information about the disconnection type, close status, reason, and provides methods to control automatic reconnection and graceful closing behavior.
Properties
Event
The type of disconnection event that occurred (see DisconnectionEvent).
CloseStatus
The WebSocket close status code, if available.
CloseStatusDescription
Optional human-readable description of why the connection was closed.
SubProtocol
The WebSocket sub-protocol that was in use, if any.
Methods
#ctor
#ctor(Event, CloseStatus, CloseStatusDescription, SubProtocol, Exception)Represents a disconnection event that occurred during WebSocket communication. Contains information about the disconnection type, close status, reason, and provides methods to control automatic reconnection and graceful closing behavior.
Parameters:
Event- The type of disconnection event that occurred (seeDisconnectionEvent).CloseStatus- The WebSocket close status code, if available.CloseStatusDescription- Optional human-readable description of why the connection was closed.SubProtocol- The WebSocket sub-protocol that was in use, if any.Exception- The exception that caused the disconnection, if applicable.
CancelReconnection
CancelReconnection()Cancels any automatic reconnection attempt that may be in progress or scheduled. Call this method to prevent the client from automatically reconnecting after a disconnection.
CancelClosing
CancelClosing()Cancels the graceful closing process of the connection. Call this method to abort a connection close that is in progress.
