SocketConnectionState

Possible states for a SocketConnection. This will start out as Disconnected with no error set and switch to Connecting when attempting to initialize a session. The Message state means that the socket is connected.

The server is always the first to send a message, so we don't have an intermediate state between Connecting and Message.

Inheritors

Types

Link copied to clipboard

A connection is currently in progress.

Link copied to clipboard
data class Disconnected(val error: Throwable? = null) : SocketConnectionState

There is no current connection. This is the default state.

Link copied to clipboard
data class Message(val message: String) : SocketConnectionState

The last received message in an active connection.