riot_sys::bindgen

Function nanocoap_cache_process

Source
pub unsafe extern "C" fn nanocoap_cache_process(
    cache_key: *const u8,
    request_method: c_uint,
    resp: *const coap_pkt_t,
    resp_len: size_t,
) -> *mut nanocoap_cache_entry_t
Expand description

@brief Determines if a response is cacheable and modifies the cache as reflected in RFC7252, Section 5.9.

@param[in] cache_key The cache key of the request @param[in] request_method The method of the initial request @param[in] resp The response to operate on @param[in] resp_len The actual length of the response in @p resp

@return The cache entry on successfully handling the response @return NULL on error