socketTimeout property

int? get socketTimeout

Socket timeout period.

Specifies the maximum time in milliseconds a connect call will wait for socket connection.

Can be used to stop excessive waiting time at the network layer. For TCP sockets only, not websockets.

Minimum value is 1000ms.

Implementation

int? get socketTimeout => _socketTimeout;
set socketTimeout (int? period)

Implementation

set socketTimeout(int? period) {
  if (period != null && period >= MqttConstants.minimumSocketTimeoutPeriod) {
    _socketTimeout = period;
  }
}