aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/clients/asynchttpclient.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace timer-based polling with curl socket-action integrationsb/async-httpclientStefan Boberg19 hours1-38/+187
| | | | | | | | | Switch from a fixed 10ms poll loop (curl_multi_perform) to the event-driven curl_multi_socket_action API. curl now tells us which sockets to watch via CURLMOPT_SOCKETFUNCTION and when to fire timeouts via CURLMOPT_TIMERFUNCTION. Socket readiness is detected through asio::ip::tcp::socket::async_wait, eliminating the polling latency entirely.
* Add async HTTP client using curl_multi + ASIOStefan Boberg20 hours1-0/+884
Introduces AsyncHttpClient backed by curl_multi_perform driven by an ASIO steady_timer. Supports callback-based and std::future-based APIs for GET/POST/PUT/DELETE/HEAD, with both owned and external io_context modes. All curl_multi state is serialized on an asio::strand, making it safe with multi-threaded io_contexts. Shared curl helpers (callbacks, URL encoding, header construction, error mapping) extracted into httpclientcurlhelpers.h to eliminate duplication between the sync and async implementations.