C#: Disconnect when idle

A Realtime client option that disconnects the socket once the last channel has been closed for the given time. Left unset, the socket stays open.

Examples

Disconnect after 30 seconds without channels

var options = new Supabase.Realtime.ClientOptions
{
    DisconnectOnEmptyChannelsAfter = TimeSpan.FromSeconds(30)
};

var realtime = new Supabase.Realtime.Client("wss://<project>.supabase.co/realtime/v1", options);