CoapClient constructor

CoapClient(
  1. Uri uri,
  2. DefaultCoapConfig _config, {
  3. InternetAddressType addressType = InternetAddressType.any,
  4. InternetAddress? bindAddress,
  5. EcdsaKeys? ecdsaKeys,
  6. PskCredentialsCallback? pskCredentialsCallback,
})

Instantiates. A supplied request is optional depending on the API call being used. If it is specified it will be prepared and used. Note that the host name part of the URI can be a name or an IP address, in which case it is not resolved.

Implementation

CoapClient(
  this.uri,
  this._config, {
  this.addressType = InternetAddressType.any,
  this.bindAddress,
  final EcdsaKeys? ecdsaKeys,
  final PskCredentialsCallback? pskCredentialsCallback,
})  : _ecdsaKeys = ecdsaKeys,
      _pskCredentialsCallback = pskCredentialsCallback {
  _eventBus = CoapEventBus(namespace: hashCode.toString());
}