View Source ExAzureSpeech.Common.ConnectionState (ex_azure_speech v0.2.0)

Defines the state of a websocket connection.

Summary

Types

All possible states for a connection.

t()

connection_id: Non-Dashered GUID for the connection.
state: The current state of the connection.
responses: List of responses.
command_queue: Queue of commands that will be executed in the event_loop.-- subscriber: The pid of the subscriber.
context: The context data of the connection.
audio_stream: A ReplayableAudioStream to read audio data.
current_stage: The current stage of the websocket.
callbacks: List of callbacks.
last_received_message_timestamp: The timestamp of the last received message from the server.
telemetry: List of telemetry data.

Types

@type state() :: :connecting | :connected | :disconnecting | :disconnected

All possible states for a connection.

@type t() :: %ExAzureSpeech.Common.ConnectionState{
  audio_stream: nil | ExAzureSpeech.Common.ReplayableAudioStream.t(),
  callbacks: [{atom(), function()}],
  command_queue: :queue.queue(),
  connection_id: ExAzureSpeech.Common.Guid.t() | nil,
  context: nil | map(),
  current_stage: nil | atom(),
  last_received_message_timestamp: nil | DateTime.t(),
  responses: [{:error, term()} | {atom(), term()}],
  state: state(),
  subscriber: nil | pid(),
  telemetry: [{String.t(), String.t()}]
}

connection_id: Non-Dashered GUID for the connection.
state: The current state of the connection.
responses: List of responses.
command_queue: Queue of commands that will be executed in the event_loop.-- subscriber: The pid of the subscriber.
context: The context data of the connection.
audio_stream: A ReplayableAudioStream to read audio data.
current_stage: The current stage of the websocket.
callbacks: List of callbacks.
last_received_message_timestamp: The timestamp of the last received message from the server.
telemetry: List of telemetry data.