Skip to main content

otCoapMessageReadToken

Function otCoapMessageReadToken 

Source
pub unsafe extern "C" fn otCoapMessageReadToken(
    aMessage: *const otMessage,
    aToken: *mut otCoapToken,
) -> otError
Expand description

Reads the Token from the CoAP message.

@param[in] aMessage The CoAP message. @param[out] aToken A pointer to a otCoapToken to output the read Token.

@retval OT_ERROR_NONE Successfully read the Token. @p aToken is updated. @retval OT_ERROR_PARSE Failed to parse the header.