needsRejection property
Indicates if this message needs to be rejected as specified in RFC 7252, section 5.4.1.
Implementation
bool get needsRejection =>
(type == CoapMessageType.non && hasUnknownCriticalOption) ||
hasFormatError ||
(this is CoapResponse && hasUnknownCriticalOption);