nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ download_client_start()

int download_client_start ( struct download_client * client,
const char * file,
size_t from )

#include <include/net/download_client.h>

Download a file.

The download is carried out in fragments of up to

CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE 

bytes for HTTP, or

CONFIG_DOWNLOAD_CLIENT_COAP_BLOCK_SIZE 

bytes for CoAP, which are delivered to the application via DOWNLOAD_CLIENT_EVT_FRAGMENT events.

Parameters
[in]clientClient instance.
[in]fileFile to download, null-terminated.
[in]fromOffset from where to resume the download, or zero to download from the beginning.
Return values
intZero on success, a negative error code otherwise.