riot_sys

Function coap_opt_finish

Source
pub unsafe extern "C" fn coap_opt_finish(
    pkt: *mut coap_pkt_t,
    flags: u16,
) -> ssize_t
Expand description

@brief Finalizes options as required and prepares for payload

@post pkt.payload advanced to first available byte after options @post pkt.payload_len is maximum bytes available for payload

@param[in,out] pkt pkt to update @param[in] flags see COAP_OPT_FINISH… macros

@return total number of bytes written to buffer @return -ENOSPC if no buffer space for payload marker