SynchronousMqttServerConnectionHandler constructor

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

Initializes a new instance of the SynchronousMqttConnectionHandler class.

Implementation

SynchronousMqttServerConnectionHandler(
  var clientEventBus, {
  @required int maxConnectionAttempts,
}) : super(maxConnectionAttempts: maxConnectionAttempts) {
  this.clientEventBus = clientEventBus;
  clientEventBus.on<AutoReconnect>().listen(autoReconnect);
  registerForMessage(MqttMessageType.connectAck, connectAckProcessor);
  clientEventBus.on<MessageAvailable>().listen(messageAvailable);
}