MqttSynchronousServerConnectionHandler constructor
MqttSynchronousServerConnectionHandler(
- dynamic clientEventBus, {
- required int maxConnectionAttempts,
- required dynamic socketOptions,
- required dynamic socketTimeout,
Initializes a new instance of the SynchronousMqttConnectionHandler class.
Implementation
MqttSynchronousServerConnectionHandler(clientEventBus,
{required int maxConnectionAttempts,
required socketOptions,
required socketTimeout})
: super(clientEventBus,
maxConnectionAttempts: maxConnectionAttempts,
socketOptions: socketOptions,
socketTimeout: socketTimeout) {
this.clientEventBus = clientEventBus;
if (socketTimeout == null) {
connectTimer = MqttCancellableAsyncSleep(5000);
} else {
connectTimer = MqttCancellableAsyncSleep(10);
}
initialiseListeners();
}