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;
connectTimer = socketTimeout == null
? MqttCancellableAsyncSleep(
MqttConstants.defaultConnectionAttemptTimeoutPeriod,
)
: MqttCancellableAsyncSleep(
MqttConstants.disabledConnectionAttemptTimeoutPeriod,
);
initialiseListeners();
}