spec property

CoapISpec spec

The CoAP specification derived from the protocol version.

Implementation

CoapISpec get spec {
  switch (version) {
    case 'RFC7252':
      return CoapRfc7252();
    default:
      throw ArgumentError("Invalid or missing version");
  }
}