MqttSynchronousServerConnectionHandler constructor
MqttSynchronousServerConnectionHandler(
- dynamic clientEventBus, {
- required int maxConnectionAttempts,
- required List<
RawSocketOption> socketOptions, - required dynamic socketTimeout,
Initializes a new instance of the SynchronousMqttConnectionHandler class.
Implementation
MqttSynchronousServerConnectionHandler(
clientEventBus, {
required int super.maxConnectionAttempts,
required super.socketOptions,
required socketTimeout,
}) : super(clientEventBus, socketTimeout: socketTimeout) {
this.clientEventBus = clientEventBus;
connectTimer = socketTimeout == null
? MqttCancellableAsyncSleep(
MqttConstants.defaultConnectionAttemptTimeoutPeriod,
)
: MqttCancellableAsyncSleep(
MqttConstants.disabledConnectionAttemptTimeoutPeriod,
);
initialiseListeners();
}