Type alias ConnectionState

ConnectionState: "disconnected" | "connecting" | "connected"

Represents the chat room connection state.

  • 'disconnected' - (initial state) Chat room is not connected and will not try to establish connection by itself. Besides it being an initial state, chat room can transition to this state when:

    • Client calls disconnect method triggering graceful closure of socket connection
    • Server gracefully closes the socket connection
    • Room reached the allowed number of reconnection attempts but still failed to establish socket connection
  • 'connecting' - Chat room is in the process of establishing a socket connection with IVS Chat Messaging API. The room will transition to this state when:

    • Client calls connect method, while being in a disconnected state, triggering the process of establishing socket connection
    • When chat room is in a connected state, and requires reconnecting, e.g. in case of connection issues
  • 'connected' - Chat room is connected and ready to send and receive messages.

Generated using TypeDoc