nRF Connect SDK API 3.3.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.

On a DOWNLOADER_EVT_ERROR event with error ECONNRESET, returning zero from the callback will let the library attempt to reconnect to the server and continue the download. Otherwise, the callback may return any non-zero value to stop the download. On any other error code than ECONNRESET, the downloader will not attempt to reconnect and will ignore the return value. To resume the download, use downloader_get().

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