open method

  1. @override
Future<void> open({
  1. dynamic connection,
})
override

Implementation

@override
Future<void> open({dynamic connection}) async {
  connection ??= this.connection;
  if (this.connection == connection && this.connection.connected) return;
  if (this.connection.connected) close();
  if (connection is String) {
    await this.connection.open(url: connection);
    connection = this.connection;
  }
  _connection = setConnection(connection);
  await this.connection.open();
  _registerEventListeners();
  events.emit("connect");
}