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

◆ downloader_callback_t

typedef int(* downloader_callback_t) (const struct downloader_evt *event)

#include <include/net/downloader.h>

Downloader asynchronous event handler.

Through this callback, the application receives events, such as download of a fragment, download completion, or errors.

When a DOWNLOADER_EVT_ERROR event is received, the return value controls whether the download is resumed: return a non-zero value to stop it, or zero to let the downloader reconnect and resume. On -ECONNRESET the downloader reconnects automatically and the event is only generated if that reconnection fails. To resume a stopped download later, use downloader_get().

Parameters
[in]eventThe event.
Returns
Zero to continue the download, non-zero otherwise.