DtlsClient constructor

DtlsClient(
  1. RawDatagramSocket _socket, {
  2. int maxTimeoutSeconds = 60,
  3. TinyDTLS? tinyDTLS,
})

Creates a new DtlsClient that uses a pre-existing RawDatagramSocket.

During connection, the client uses a default maximal timeout of 60 seconds for each handshake exchange and will resend messages during each exchange with an increasing delay. The total time span used for the timeout of message exchanges can be set with the _maxTimeoutSeconds argument.

Implementation

DtlsClient(this._socket, {int maxTimeoutSeconds = 60, TinyDTLS? tinyDTLS})
    : _maxTimeoutSeconds = maxTimeoutSeconds,
      _tinyDtls = initializeTinyDtls(tinyDTLS) {
  _startListening();
}