riot_sys

Function nanocoap_sock_get_blockwise

Source
pub unsafe extern "C" fn nanocoap_sock_get_blockwise(
    sock: *mut nanocoap_sock_t,
    path: *const c_char,
    blksize: coap_blksize_t,
    callback: coap_blockwise_cb_t,
    arg: *mut c_void,
) -> c_int
Expand description

@brief Performs a blockwise coap get request on a socket.

This function will fetch the content of the specified resource path via block-wise-transfer. A coap_blockwise_cb_t will be called on each received block.

@param[in] sock socket to use for the request @param[in] path pointer to source path @param[in] blksize sender suggested SZX for the COAP block request @param[in] callback callback to be executed on each received block @param[in] arg optional function arguments

@returns -1 if failed to fetch the url content @returns 0 on success