[][src]Type Definition openthread_sys::otCoapResponseHandler

type otCoapResponseHandler = Option<unsafe extern "C" fn(aContext: *mut c_void, aMessage: *mut otMessage, aMessageInfo: *const otMessageInfo, aResult: otError)>;

This function pointer is called when a CoAP response is received or on the request timeout.

@param[in] aContext A pointer to application-specific context. @param[in] aMessage A pointer to the message buffer containing the response. NULL if no response was received. @param[in] aMessageInfo A pointer to the message info for @p aMessage. NULL if no response was received. @param[in] aResult A result of the CoAP transaction.

@retval OT_ERROR_NONE A response was received successfully. @retval OT_ERROR_ABORT A CoAP transaction was reset by peer. @retval OT_ERROR_RESPONSE_TIMEOUT No response or acknowledgment received during timeout period.