pub unsafe extern "C" fn otCoapSendRequest(
aInstance: *mut otInstance,
aMessage: *mut otMessage,
aMessageInfo: *const otMessageInfo,
aHandler: otCoapResponseHandler,
aContext: *mut c_void,
) -> otErrorExpand description
Sends a CoAP request.
If a response for a request is expected, respective function and context information should be provided. If no response is expected, these arguments should be NULL pointers.
@param[in] aInstance A pointer to an OpenThread instance. @param[in] aMessage A pointer to the message to send. @param[in] aMessageInfo A pointer to the message info associated with @p aMessage. @param[in] aHandler A function pointer that shall be called on response reception or timeout. @param[in] aContext A pointer to arbitrary context information. May be NULL if not used.
@retval OT_ERROR_NONE Successfully sent CoAP message. @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data.