Table of Contents

Interface IRealtimePresence

Namespace
Supabase.Realtime.Interfaces
Assembly
Supabase.Realtime.dll

Contract representing a Realtime Presence class

public interface IRealtimePresence

Methods

AddPresenceEventHandler(EventType, PresenceEventHandler)

Add a presence event handler

void AddPresenceEventHandler(IRealtimePresence.EventType eventType, IRealtimePresence.PresenceEventHandler handler)

Parameters

eventType IRealtimePresence.EventType
handler IRealtimePresence.PresenceEventHandler

ClearPresenceEventHandlers(EventType?)

Clear presence events.

void ClearPresenceEventHandlers(IRealtimePresence.EventType? eventType = null)

Parameters

eventType IRealtimePresence.EventType?

RemovePresenceEventHandlers(EventType, PresenceEventHandler)

Remove a presence event handler

void RemovePresenceEventHandlers(IRealtimePresence.EventType eventType, IRealtimePresence.PresenceEventHandler handler)

Parameters

eventType IRealtimePresence.EventType
handler IRealtimePresence.PresenceEventHandler

Track(object?, int)

Send an arbitrary payload as a presence event, MUST be called once to register this client as an active presence.

Task<Push> Track(object? payload, int timeoutMs = 10000)

Parameters

payload object
timeoutMs int

Returns

Task<Push>

Untrack()

Untracks a client

Task<Push> Untrack()

Returns

Task<Push>