connect method
Connect to the given Resgate server.
pingInterval controls how often a keepalive ping is sent to prevent
the connection from being silently dropped by intermediaries.
Implementation
void connect(
String url, {
Duration pingInterval = const Duration(seconds: 30),
}) {
_connectUrl = url;
_pingInterval = pingInterval;
_doNotReconnect = false;
_initializeChannel();
}