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
IsSent
Is push sent?
bool IsSent { get; }
Property Value
Message
The wrapped SocketRequest
SocketRequest? Message { get; }
Property Value
Payload
The payload (present in Message)
object? Payload { get; }
Property Value
Ref
A unique ID representing this push.
string? Ref { get; }
Property Value
Response
The server's response
IRealtimeSocketResponse? Response { get; }
Property Value
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