riot_sys

Function nanocoap_server_send_separate

Source
pub unsafe extern "C" fn nanocoap_server_send_separate(
    ctx: *const nanocoap_server_response_ctx_t,
    code: c_uint,
    type_: c_uint,
    payload: *const c_void,
    len: size_t,
) -> c_int
Expand description

@brief Send a separate response to a CoAP request

This sends a response to a CoAP request outside the CoAP handler

@pre @ref nanocoap_server_prepare_separate has been called on @p ctx inside the CoAP handler @pre Synchronization between calls of this function and calls of @ref nanocoap_server_prepare_separate is ensured

@warning This function is only available when using the module nanocoap_server_separate

@param[in] ctx Context information for the CoAP response @param[in] code CoAP response code @param[in] type Response type, may be COAP_TYPE_NON @param[in] payload Response payload @param[in] len Payload length

@returns 0 on success negative error (see @ref sock_udp_sendv_aux)