Table of Contents

Interface IRealtimePush<TChannel, TSocketResponse>

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

Contract representing a "Push" or an outgoing message to the socket server

public interface IRealtimePush<TChannel, TSocketResponse> where TChannel : IRealtimeChannel where TSocketResponse : IRealtimeSocketResponse

Type Parameters

TChannel
TSocketResponse

Properties

Channel

The calling or parent channel

TChannel Channel { get; }

Property Value

TChannel

EventName

The event name this push is registered under.

string EventName { get; }

Property Value

string

IsSent

Is push sent?

bool IsSent { get; }

Property Value

bool

Message

The wrapped SocketRequest

SocketRequest? Message { get; }

Property Value

SocketRequest

Payload

The payload (present in Message)

object? Payload { get; }

Property Value

object

Ref

A unique ID representing this push.

string? Ref { get; }

Property Value

string

Response

The server's response

IRealtimeSocketResponse? Response { get; }

Property Value

IRealtimeSocketResponse

Methods

AddMessageReceivedHandler(MessageEventHandler)

Add a message received handler

void AddMessageReceivedHandler(IRealtimePush<TChannel, TSocketResponse>.MessageEventHandler handler)

Parameters

handler IRealtimePush<TChannel, TSocketResponse>.MessageEventHandler

ClearMessageReceivedHandler()

Clear Message received handlers.

void ClearMessageReceivedHandler()

RemoveMessageReceivedHandler(MessageEventHandler)

Remove a message received handler

void RemoveMessageReceivedHandler(IRealtimePush<TChannel, TSocketResponse>.MessageEventHandler handler)

Parameters

handler IRealtimePush<TChannel, TSocketResponse>.MessageEventHandler

Resend(int)

Resend this push, only called on a failed push attempt.

void Resend(int timeoutMs = 10000)

Parameters

timeoutMs int

Send()

Send this push.

void Send()

Events

OnTimeout

A timeout event handler.

event EventHandler? OnTimeout

Event Type

EventHandler