pub unsafe extern "C" fn otCoapSecureSendRequest(
aInstance: *mut otInstance,
aMessage: *mut otMessage,
aHandler: otCoapResponseHandler,
aContext: *mut c_void,
) -> otError
Expand description
Sends a CoAP request over secure DTLS connection.
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. If Message Id was not set in the header (equal to 0), this function will assign unique Message Id to the message.
@param[in] aInstance A pointer to an OpenThread instance. @param[in] aMessage A reference to the message to send. @param[in] aHandler A function pointer that shall be called on response reception or time-out. @param[in] aContext A pointer to arbitrary context information.
@retval OT_ERROR_NONE Successfully sent CoAP message. @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data. @retval OT_ERROR_INVALID_STATE DTLS connection was not initialized.