Repository navigation
Client corosio - #40
Merged
Merged
Conversation
The protocol backends are anyhttp::h1, h2, h2v2, quic and h3, instead of beast_impl, nghttp2 (both HTTP/2 backends) and http3, and so is what their backend headers offer generic code: quic::QuicServer, quic::make_quic_server(), h3::make_http3_application(), h3::async_connect_http3(). The role files in quic/ and h3/ are in their protocol's namespace, no longer in anyhttp::server or anyhttp::client. h2v2/ defines the factories of h2/backend.hpp in anyhttp::h2, where they are declared, so that nothing above that header can tell the two HTTP/2 backends apart. The runtimes are the inline namespaces anyhttp::asio and anyhttp::corosio. Their vocabulary is still named as anyhttp's, but its symbols carry the runtime, so code of the two runtimes cannot link together. code() moves in from the global namespace, and normalize(IpAddress), which each runtime defines, is declared by the runtimes rather than common.hpp. That takes the names asio and corosio inside anyhttp: the aliases for boost::asio and boost::corosio are gone and Boost's namespaces are spelled in full, also in the tests and examples, where an alias of the same name is ambiguous with using namespace anyhttp. any_async_stream.hpp no longer leaks the global aliases asio and ip. Generic code must not reopen a runtime's namespace: clang makes "namespace anyhttp::io" a namespace of its own instead of extending the inline one, as GCC does, so net.hpp and net.cpp open the runtime's io by #if. Doxygen gets an input filter that presents the runtime's names as anyhttp's, as the reference has them. CLAUDE.md has both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
client_main.cpp is written on the runtime layer now, like the server program: Task, launch(), when_both() and the coroutine forms connect(), submit(), write_eof() and shutdown(), instead of Asio's awaitable, co_spawn and awaitable operators. Errors are printed and end the program with 1 rather than escaping run(), the session is shut down cleanly, --help prints the usage, and an optional third argument names the CA file, without which https fails verification. The client is built and installed on both runtimes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
No description provided.