Returns the current state of the Realtime connection: Closed, Connecting, or Open.
Connecting also covers a socket that is reconnecting after it lost the connection.AddStateChangedHandler().var state = supabase.Realtime.ConnectionState;
if (state == Supabase.Realtime.Constants.ConnectionState.Open)
{
Debug.WriteLine("Connected");
}
supabase.Realtime.AddStateChangedHandler((sender, state) =>
{
Debug.WriteLine($"Socket state: {state}");
});