Cluster constructor

Cluster(
  1. Nyxx _client,
  2. Snowflake _clientId, [
  3. Level? loggingLevel
])

Creates a new cluster ready to start adding connections

Implementation

Cluster(this._client, this._clientId, [Level? loggingLevel]) {
  this._registerEvents();

  this._eventDispatcher = _EventDispatcher(this);

  this._receiveStream = this._receivePort.asBroadcastStream();

  this._receiveStream.listen(_handleNodeMessage);

  Logger.root.level = loggingLevel ?? Level.INFO;
}