libfetch 0.0.0
A lightweight asynchronous HTTP/1.1 client library implementing a subset of the WHATWG Fetch API.
|
Control the event loop for asynchronous operations. More...
Functions | |
bool | fetch_event_loop_start (void) |
Start the event loop. | |
void | fetch_event_loop_stop (void) |
Stop the event loop. | |
int | fetch_event_loop_process (uint32_t timeout_ms) |
Process events in the event loop (NON-BLOCKING with timeout) | |
bool | fetch_event_loop_is_running (void) |
Check if the event loop is running. | |
Control the event loop for asynchronous operations.
bool fetch_event_loop_is_running | ( | void | ) |
Check if the event loop is running.
int fetch_event_loop_process | ( | uint32_t | timeout_ms | ) |
Process events in the event loop (NON-BLOCKING with timeout)
Call this regularly to make progress on asynchronous requests. This function will return after processing available events or when the timeout expires.
timeout_ms | Maximum time to wait for events (0 for non-blocking) |
bool fetch_event_loop_start | ( | void | ) |
Start the event loop.
Must be called before making asynchronous requests. The event loop runs in the calling thread and must be driven by calling fetch_event_loop_process() regularly.
void fetch_event_loop_stop | ( | void | ) |
Stop the event loop.
Cancels all pending requests and shuts down the event loop. Call this during cleanup to free event loop resources.