connect method

Future<void> connect()

Opens the connection and completes once the server has assigned a socket id. Called for you by the first stream listener.

Implementation

Future<void> connect() {
  if (_closed) throw StateError('This HorusRealtime has been closed.');
  if (_socketId != null) return Future.value();
  _retry?.cancel();
  _retry = null;
  return _open();
}