If I want to use Firebase now from .NET in C#, what is your suggestion as the best way to handle the callbacks? I see your current client library is using WebSockets. Can you offer a small example of how best to set this up in C#?
Right now the only option is to interface with Firebase through the REST api. This will not give you real-time data updates, but you can read and write to Firebase. For instance, it would be very suitable for an ASP.Net backend to use the REST API to broadcast data to clients which are using the JavaScript client.
As for a full C# client equivalent to the JavaScript client (capable of syncing data and receiving realtime updates), that unfortunately isn't feasible right now. The wire protocol used within the WebSocket isn't documented or stable, and the guts of the client code are actually pretty gnarly. We're hoping to release a spec in the future so people can write more clients, but it's changing too frequently right now. Sorry!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With