SynchronousMqttServerConnectionHandler constructor

SynchronousMqttServerConnectionHandler(
  1. dynamic clientEventBus, {
  2. required int maxConnectionAttempts,
  3. required dynamic socketOptions,
  4. dynamic reconnectTimePeriod = 5000,
})

Initializes a new instance of the SynchronousMqttConnectionHandler class.

Implementation

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