riot_sys

Function nanocoap_sock_block_request

Source
pub unsafe extern "C" fn nanocoap_sock_block_request(
    ctx: *mut coap_block_request_t,
    data: *const c_void,
    len: size_t,
    more: bool,
    cb: coap_request_cb_t,
    arg: *mut c_void,
) -> c_int
Expand description

@brief Do a block-wise request, send a single block.

     This method is expected to be called in a loop until all
     payload blocks have been transferred.

@pre @p ctx was initialized with @ref nanocoap_block_request_connect_url or manually.

@param[in] ctx blockwise request context @param[in] data payload to send @param[in] len payload length @param[in] more more blocks after this one (will be set automatically if @p len > block size) @param[in] cb callback for response @param[in] arg callback context

@return Number of payload bytes written on success Negative error on failure