Repository navigation
refactor(http): dispatch default streams asynchronously - #230
Merged
MisterVVP merged 1 commit intoAug 29, 2026
Conversation
MisterVVP
marked this pull request as ready for review
August 29, 2026 11:47
MisterVVP
merged commit Aug 29, 2026
73c3063
into
dev-make-libcurl-streaming-cancellation-event-driven
31 of 32 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Client::StreamRequest()API as a waiting wrapper.docs/streaming-usage.md.Description
StreamDispatchExecutorwith a small pool and per-streamSerialStreamDispatchqueues to serialize per-stream callbacks off the reactor thread. (new code insrc/http/http_client.cpp).AsyncStreamStatethat holds easy-handle, headers, buffers, callback wrappers, cancellation registration, and a transferlifetimeobject so libcurl callbacks reference only heap-owned state that stays valid until reactor completion. (new code insrc/http/http_client.cpp).a2a::http::ClientwithStartStreamRequest(...)to register an asynchronous reactor transfer and invoke aStreamCompletioncallback on completion; made the original synchronousStreamRequest(...)a small wrapper that waits onStartStreamRequest. (changes ininclude/a2a/http/http_client.handsrc/http/http_client.cpp).CurlStreamReactor::Transferreport completions via anon_completecallback and stopped performing heavyweight work in socket/timer callbacks; reactor only queues add/remove/complete operations. (changes insrc/http/http_client.cpp).HttpJsonTransportandJsonRpcTransportnow create and use a default asynca2a::http::Clientfor streaming, falling back to the executor-worker compatibility path if a custom synchronous requester was injected. (changes insrc/client/transport/http_json_transport.cpp,src/client/transport/json_rpc_transport.cpp, and headers).HttpRequest/HttpClientResponseanda2a::http::Request/Responsefor the bridge, and updatedStartSseStreamcall sites to use the async client when available. (changes insrc/client/transport/*).docs/streaming-usage.md).