getCoapCode

open fun getCoapCode(): Int

If this response is from a CoAP transport scheme, get the CoAP response code. Otherwise this method will return 0. The code returned from this method should always indicate a successful response because, on error, a McuMgrCoapException will be thrown (triggering the onError callback for asynchronous request).

Return

The CoAP response code for a CoAP scheme, 0 otherwise.