View Source Appwrite.Types.Client.Realtime (appwrite v0.1.6)

Struct representing the structure of a realtime communication object.

Summary

Functions

Cleans up resources associated with specified channels.

Establishes a WebSocket connection.

Gets the timeout duration for communication operations.

Initializes a new Realtime struct with default values.

Handles incoming messages from the WebSocket connection.

Types

@type t() :: %Appwrite.Types.Client.Realtime{
  channels: MapSet.t(String.t()),
  last_message: Appwrite.Types.Client.RealtimeResponse.t() | nil,
  reconnect: boolean(),
  reconnect_attempts: non_neg_integer(),
  socket: WebSocket.t() | nil,
  subscriptions: %{
    required(integer()) => %{
      channels: [String.t()],
      callback: (Appwrite.Types.Client.RealtimeResponseEvent.t() -> any())
    }
  },
  subscriptions_counter: non_neg_integer(),
  timeout: non_neg_integer() | nil,
  url: String.t() | nil
}

Functions

Link to this function

clean_up(realtime, channels)

View Source

Cleans up resources associated with specified channels.

Establishes a WebSocket connection.

Gets the timeout duration for communication operations.

Initializes a new Realtime struct with default values.

Link to this function

on_message(realtime, message_event)

View Source

Handles incoming messages from the WebSocket connection.