- Update Dependency:
Websocket.Client@5.1.2
- Update Dependency:
Supabase.Postgrest@4.0.3
- Re:#167 Adds support for specifying
GetHeaders
on theRealtimeClient
which are included on the initial request to the server to establish websocket connection.
- Re: #47 Return a Task from
Track
andUntrack
methods
- Merges #45 - Updating the
Websocket.Client@5.1.1
- Re: #135 Update nuget package
name
realtime-csharp
toSupabase.Realtime
- Updates Dependencies
- Fixes #29 Where the Realtime client could
disconnect from channels after a few hours and fail to reconnect by removing the case where the
IsSubscribe
flag is flipped when encountering a channel error.
- Updates usage of
Supabase.Core
assembly
- Updates assembly name to
Supabase.Realtime
- Updates publishing action for future packages, includes README and icon.
- Merges #28 and #30
- The realtime client now takes a "fail-fast" approach. On establishing an initial connection, client will throw
a
RealtimeException
inConnectAsync()
if the socket server is unreachable. After an initial connection has been established, the client will continue attempting reconnections indefinitely until disconnected. - [Major, New] C#
EventHandlers
have been changed todelegates
. This should allow for cleaner event data access over the previous subclassedEventArgs
setup. Events are scoped accordingly. For example, theRealtimeSocket
error handlers will receive events regarding socket connectivity; whereas theRealtimeChannel
error handlers will receive events according toChannel
joining/leaving/etc. This is implemented with the following methods prefixed by ( Add/Remove/Clear):RealtimeBroadcast.AddBroadcastEventHandler
RealtimePresence.AddPresenceEventHandler
RealtimeSocket.AddStateChangedHandler
RealtimeSocket.AddMessageReceivedHandler
RealtimeSocket.AddHeartbeatHandler
RealtimeSocket.AddErrorHandler
RealtimeClient.AddDebugHandler
RealtimeClient.AddStateChangedHandler
RealtimeChannel.AddPostgresChangeHandler
RealtimeChannel.AddMessageReceivedHandler
RealtimeChannel.AddErrorHandler
Push.AddMessageReceivedHandler
- [Major, new]
ClientOptions.Logger
has been removed in favor ofClient.AddDebugHandler()
which allows for implementing custom logging solutions if desired.- A simple logger can be set up with the following:
client.AddDebugHandler((sender, message, exception) => Debug.WriteLine(message));
- [Major]
Connect()
has been markedObsolete
in favor ofConnectAsync()
- Custom reconnection logic has been removed in favor of using the built-in logic from
Websocket.Client@4.6.1
. - Exceptions that are handled within this library have been marked as
RealtimeException
s. - The local, docker-composed test suite has been brought back (as opposed to remotely testing on live supabase servers) to test against.
- Comments have been added throughout the entire codebase and an
XML
file is now generated on build.
- Re: #27
PostgresChangesOptions
was not settinglistenType
in constructor. Thanks @Kuffs2205
- Re: #26 - Fixes Connect() not returning callback result when the socket isn't null. Thanks @BlueWaterCrystal!
- Re: #25 - Support Channel being resubscribed after
having been unsubscribed, fixes rejoin timer being erroneously called on channel
Unsubscribe
. Thanks @Kuffs2205!
- Re: #24 - Fixes join failing until reconnect happened + adds access token push on channel join. Big thank you to @Honeyhead for the help debugging and identifying!
- Re: #22 -
SerializerSettings
were not being passed toPostgresChangesResponse
- Thanks @Shenrak for the help debugging!
- Re: #21 Provide API for
presence
,broadcast
andpostgres_changes
- [Major, New]
Channel.PostgresChanges
event will receive the wildcard*
changes event, notChannel.OnMessage
. - [Major]
Channel.OnInsert
,Channel.OnUpdate
, andChannel.OnDelete
now conform to the server's payload ofResponse.Payload.**Data**
- [Major]
Channel.OnInsert
,Channel.OnUpdate
, andChannel.OnDelete
now returnPostgresChangesEventArgs
- [Minor] Rename
Channel
toRealtimeChannel
- Supports better handling of disconnects in
RealtimeSocket
and adds aClient.OnReconnect
event. - [Minor] Moves
ChannelOptions
toChannel.ChannelOptions
- [Minor] Moves
ChannelStateChangedEventArgs
toChannel.ChannelStateChangedEventArgs
- [Minor] Moves
Push
toChannel.Push
- [Minor] Moves
Channel.ChannelState
toConstants.ChannelState
- [Minor] Moves
SocketResponse
,SocketRequest
,SocketResponsePayload
,SocketResponseEventArgs
, andSocketStateChangedEventArgs
toSocket
namespace. - [New] Adds
RealtimeBroadcast
- [New] Adds
RealtimePresence
- [Improvement] Better handling of disconnection/reconnection
- [Major, New]
- Bugfixes on previous release.
- Re: #17 Restructure Project to support Dependency
Injection and Enable Nullity
Client
is no longer a singleton class.Channel
has a new constructor that usesChannelOptions
Channel.Parameters
has been changed in favor ofChannel.Options
Channel
andPush
are now directly dependent on havingSocket
andSerializerSettings
passed in as opposed to referencing theSingleton
instance.- All publicly facing classes (that offer functionality) now include an Interface.
- Fixed deserialization of
DateTimes
- Exchange existing websocket client: WebSocketSharp for Marfusios/websocket-client which adds support for Blazor WASM apps. Ref: #14
- #12: Implement Upstream Realtime RLS Error Broadcast Handling
SocketResponse
now exposes a method:OldModel
, that hydrates theOldRecord
property into a model.
- #11
user_token
Channel parameter is now set in theSetAuth
call.
- Bugfix introduced by 2.0.5, remove exposed
Client.Instance.subscriptions
- Fixed test for (
Client: Join channels of format: {database}:{schema}:{table}:{col}=eq.{val}
) - Add support for WALRUS
AccessToken
Pushes on every heartbeat see #12