MqttSynchronousBrowserConnectionHandler constructor

MqttSynchronousBrowserConnectionHandler(
  1. dynamic clientEventBus, {
  2. required int maxConnectionAttempts,
})

Initializes a new instance of the MqttConnectionHandler class.

Implementation

MqttSynchronousBrowserConnectionHandler(
  clientEventBus, {
  required int maxConnectionAttempts,
}) : super(clientEventBus, maxConnectionAttempts: maxConnectionAttempts) {
  this.clientEventBus = clientEventBus;
  connectTimer = MqttCancellableAsyncSleep(5000);
  initialiseListeners();
}