[][src]Function libcoap_sys::coap_add_data

pub unsafe extern "C" fn coap_add_data(
    pdu: *mut coap_pdu_t,
    len: usize,
    data: *const u8
) -> c_int

Adds given data to the pdu that is passed as first parameter. Note that the PDU's data is destroyed by coap_add_option(). coap_add_data() must be called only once per PDU, otherwise the result is undefined.