SynchronousMqttServerConnectionHandler constructor

SynchronousMqttServerConnectionHandler(
  1. EventBus? clientEventBus, {
  2. required int maxConnectionAttempts,
  3. required List<RawSocketOption> socketOptions,
  4. required Duration? socketTimeout,
  5. dynamic reconnectTimePeriod = 5000,
})

Initializes a new instance of the SynchronousMqttConnectionHandler class.

Implementation

SynchronousMqttServerConnectionHandler(
  super.clientEventBus, {
  required int maxConnectionAttempts,
  required super.socketOptions,
  required super.socketTimeout,
  reconnectTimePeriod = 5000,
}) : super(maxConnectionAttempts: maxConnectionAttempts) {
  connectTimer = MqttCancellableAsyncSleep(reconnectTimePeriod);
  initialiseListeners();
}