BoltServer constructor

BoltServer({
  1. required List<BoltBinding> bindings,
  2. Logger? logger,
  3. int maxConnections = 64,
})

A server that listens for incoming Connections.

Implementation

BoltServer({
  required super.bindings,
  super.logger,
  this.maxConnections = 64,
})  : _connections = List.filled(maxConnections, null),
      _confirmedConnections = List.filled(maxConnections, false),
      _connectedController = StreamController<Connection>.broadcast(),
      _disconnectedController = StreamController<Connection>.broadcast() {
  connected = _connectedController.stream;
  disconnected = _disconnectedController.stream;

  _serverSalt = generateSalt();

  on(_connectionRequest);
  on(_challengeResponse);
  on(_disconnect);
}