pub unsafe extern "C" fn otCoapMessageInitResponse(
aResponse: *mut otMessage,
aRequest: *const otMessage,
aType: otCoapType,
aCode: otCoapCode,
) -> otError
Expand description
Initializes a response message.
@note Both message ID and token are set according to @p aRequest.
@param[in,out] aResponse A pointer to the CoAP response message. @param[in] aRequest A pointer to the CoAP request message. @param[in] aType CoAP message type. @param[in] aCode CoAP message code.
@retval OT_ERROR_NONE Successfully initialized the response message. @retval OT_ERROR_NO_BUFS Insufficient message buffers available to initialize the response message.