nRF Connect SDK API 2.8.0
|
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.
[in] | client | Client instance. |
[in] | file | File to download, null-terminated. |
[in] | from | Offset from where to resume the download, or zero to download from the beginning. |
int | Zero on success, a negative error code otherwise. |