libfetch 0.0.0
A lightweight asynchronous HTTP/1.1 client library implementing a subset of the WHATWG Fetch API.
|
Support for streaming files with user-controlled completion. More...
Typedefs | |
typedef fetch_stream_result_t(* | fetch_file_continue_cb) (void *userdata) |
Callback function for controlling file streaming continuation. | |
Enumerations | |
enum | fetch_stream_result_t { FETCH_STREAM_READ = 0 , FETCH_STREAM_DONE = 1 , FETCH_STREAM_SKIP = 2 } |
Return codes for file streaming continue callback. More... | |
Support for streaming files with user-controlled completion.
typedef fetch_stream_result_t(* fetch_file_continue_cb) (void *userdata) |
Callback function for controlling file streaming continuation.
This callback is called when the library needs to determine if there's more data to read from a streaming file. Use this for files of unknown length like continuously written logs or live streams.
The callback should return:
userdata | User-provided data passed to fetch_body_file() |