Session

abstract class Session

Represents a managed connection to a Room which can contain an Agent.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val connectionState: ConnectionState

The ConnectionState of the session.

Link copied to clipboard
abstract val isConnected: Boolean

Whether the session is connected or not.

Link copied to clipboard
abstract val isReconnecting: Boolean

Whether the session is reconnecting or not.

Link copied to clipboard
abstract val room: Room

The Room object used for this session.

Functions

Link copied to clipboard
abstract fun end()

Disconnect from the session.

Link copied to clipboard
abstract suspend fun prepareConnection()

Prepares the connection to speed up initial connection time.

Link copied to clipboard
abstract suspend fun start(options: SessionConnectOptions = SessionConnectOptions()): Result<Unit>

Connect to the session.

Link copied to clipboard
abstract suspend fun waitUntilConnected()

A function that suspends until the session is connected.

Link copied to clipboard
abstract suspend fun waitUntilDisconnected()

A function that suspends until the session is disconnected.