[−][src]Function libcoap_sys::coap_add_block
pub unsafe extern "C" fn coap_add_block(
pdu: *mut coap_pdu_t,
len: c_uint,
data: *const u8,
block_num: c_uint,
block_szx: c_uchar
) -> c_int
Adds the @p block_num block of size 1 << (@p block_szx + 4) from source @p data to @p pdu.
@param pdu The message to add the block. @param len The length of @p data. @param data The source data to fill the block with. @param block_num The actual block number. @param block_szx Encoded size of block @p block_number.
@return @c 1 on success, @c 0 otherwise.