Table of Contents

Namespace Supabase.Realtime

Classes

Client

Singleton that represents a Client connection to a Realtime Server.

It maintains a singular Websocket with asynchronous listeners (RealtimeChannels).

ClientOptions

Options used when initializing a Client

Constants

Shared constants for Realtime

RealtimeBroadcast<TBroadcastModel>

Represents a realtime broadcast client.

Broadcast follows the publish-subscribe pattern where a client publishes messages to a channel with a unique identifier. Other clients can elect to receive the message in real-time by subscribing to the channel with the same unique identifier. If these clients are online and subscribed then they will receive the message.

Broadcast works by connecting your client to the nearest Realtime server, which will communicate with other servers to relay messages to other clients. A common use-case is sharing a user's cursor position with other clients in an online game.

RealtimeChannel

Class representation of a channel subscription

RealtimePresence<TPresenceModel>

Represents a realtime presence client.

When a client subscribes to a channel, it will immediately receive the channel's latest state in a single message. Clients are free to come-and-go as they please, and as long as they are all subscribed to the same channel then they will all have the same Presence state as each other. If a client is suddenly disconnected (for example, they go offline), their state will be automatically removed from the shared state.

RealtimeSocket

Socket connection handler.

Enums

Constants.ChannelEventName

Mapping for event names that can be used with Push(string, string?, object?, int) to send arbitrary data. This is unlikely to be used by the developer.

Constants.ChannelState

Mapping of channel states, used with RealtimeChannel

Constants.EventType

A channel event type used and parsed in a SocketResponse

Constants.PresenceListenEventTypes

Map of Presence listener types, used with: RealtimePresence<TPresenceModel>

Constants.SocketState

The Current Socket state, used in RealtimeSocket