All Projects → supabase-community → realtime-csharp

supabase-community / realtime-csharp

Licence: MIT license
A C# client library for supabase/realtime.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to realtime-csharp

TweetMigration
A WebGL heatmap of global Twitter activity
Stars: ✭ 42 (+20%)
Mutual labels:  socket, realtime
SocketIOUnity
A Wrapper for socket.io-client-csharp to work with Unity.
Stars: ✭ 69 (+97.14%)
Mutual labels:  socket, realtime
Supabase
The open source Firebase alternative. Follow to stay updated about our public Beta.
Stars: ✭ 25,142 (+71734.29%)
Mutual labels:  realtime, supabase
Clusterws Client Js
🔥 JavaScript Client for ClusterWS - lightweight, fast and powerful framework for building scalable WebSocket applications in Node.js.
Stars: ✭ 120 (+242.86%)
Mutual labels:  socket, realtime
Socketcluster Server
Minimal server module for SocketCluster
Stars: ✭ 70 (+100%)
Mutual labels:  socket, realtime
Clusterws
💥 Lightweight, fast and powerful framework for building scalable WebSocket applications in Node.js
Stars: ✭ 868 (+2380%)
Mutual labels:  socket, realtime
echo-server
Echo Server is a Docker-ready, multi-scalable Node.js application used to host your own Socket.IO server for Laravel Broadcasting.
Stars: ✭ 32 (-8.57%)
Mutual labels:  socket, realtime
Progress Bot
High-tech weaponized moe progress delivery bot for IRC, Discord, and web
Stars: ✭ 38 (+8.57%)
Mutual labels:  socket, realtime
Rltm.js
Easily swap realtime providers with a single code base
Stars: ✭ 106 (+202.86%)
Mutual labels:  socket, realtime
ClusterWS-Client-Swift
☄️ Swift Client for ClusterWS - lightweight, fast and powerful framework for building scalable WebSockets applications in Node.js.
Stars: ✭ 20 (-42.86%)
Mutual labels:  socket, realtime
smag
Show Me A Graph - Command Line Graphing
Stars: ✭ 78 (+122.86%)
Mutual labels:  realtime
showdown-battle-bot
Socket Battle Bot for Pokemon Showdown (http://pokemonshowdown.com/)
Stars: ✭ 19 (-45.71%)
Mutual labels:  socket
intrinio-realtime-python-sdk
Intrinio Python SDK for Real-Time Stock Prices
Stars: ✭ 79 (+125.71%)
Mutual labels:  realtime
nuxt-supabase
A supa simple wrapper around Supabase.js to enable usage within Nuxt.
Stars: ✭ 146 (+317.14%)
Mutual labels:  supabase
PulseInstrument
脉象仪 波形实时绘制 Demo
Stars: ✭ 30 (-14.29%)
Mutual labels:  socket
revai-node-sdk
Node.js SDK for the Rev AI API
Stars: ✭ 21 (-40%)
Mutual labels:  realtime
wxapp-socket
用于微信小程序socket通信的封装
Stars: ✭ 17 (-51.43%)
Mutual labels:  socket
soketi
Just another simple, fast, and resilient open-source WebSockets server. 📣
Stars: ✭ 2,202 (+6191.43%)
Mutual labels:  realtime
phaChat
a web chat by node.js 一个基于 node.js 的多人 web 聊天室
Stars: ✭ 18 (-48.57%)
Mutual labels:  socket
godot-engine.supabase
A lightweight addon which integrates Supabase APIs for Godot Engine out of the box.
Stars: ✭ 39 (+11.43%)
Mutual labels:  supabase


Realtime-csharp is written as a client library for supabase/realtime.

Documentation can be found here.

The bulk of this library is a translation and c-sharp-ification of the supabase/realtime-js library.

The Websocket-sharp implementation that Realtime-csharp is dependent on does not support TLS1.3

Getting Started

Care was had to make this API as easytm to interact with as possible. Connect() and Subscribe() have await-able signatures which allow Users to be assured that a connection exists prior to interacting with it.

var endpoint = "ws://localhost:3000";
client = Client.Initialize(endpoint);

await client.Connect();

var channel = client.Channel("realtime", "public", "users");

// Per Event Callbacks
channel.OnInsert += (sender, args) => Console.WriteLine("New item inserted: " + args.Response.Payload.Record);
channel.OnUpdate += (sender, args) => Console.WriteLine("Item updated: " + args.Response.Payload.Record);
channel.OnDelete += (sender, args) => Console.WriteLine("Item deleted");

// Callback for any event, INSERT, UPDATE, or DELETE
channel.OnMessage += (sender, args) => Debug.WriteLine(args.Message.Event);

await channel.Subscribe();

Leveraging Postgrest.BaseModels, one ought to be able to coerce SocketResponse Records into their associated models by calling:

// ...
var channel = client.Channel("realtime", "public", "users");

channel.OnInsert += (sender, args) => {
    var model = args.Response.Model<User>();
};

await channel.Subscribe();

Status

  • Client Connects to Websocket
  • Socket Event Handlers
    • Open
    • Close - when channel is explicitly closed by server or by calling Channel.Unsubscribe()
    • Error
  • Realtime Event Handlers
    • INSERT
    • UPDATE
    • DELETE
    • *
  • Join channels of format:
    • {database}
    • {database}:{schema}
    • {database}:{schema}:{table}
    • {database}:{schema}:{table}:{col}.eq.{val}
  • Responses supply a Generically Typed Model derived from BaseModel
  • Ability to remove subscription to Realtime Events
  • Ability to disconnect from socket.
  • Socket reconnects when possible
  • Unit Tests
  • Documentation
  • Nuget Release

Package made possible through the efforts of:

Join the ranks! See a problem? Help fix it!

Made with contrib.rocks.

Contributing

We are more than happy to have contributions! Please submit a PR.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].