Skip to content

Cleanup - #12

Merged
pgit merged 2 commits into
masterfrom
cleanup
Sep 7, 2026
Merged

pgit merged 2 commits into
masterfrom
cleanup

Conversation

@pgit

@pgit pgit commented Sep 7, 2026

Copy link
Copy Markdown
Owner

No description provided.

pgit and others added 2 commits September 7, 2026 19:27
src/ngtcp2/ was the final remnant of the vendored ngtcp2 examples. Its five
helpers all belong to the HTTP/3 backend and nothing else, so they move into
anyhttp::http3 next to the other shared QUIC/HTTP/3 building blocks, keeping
the provenance and MIT note in a banner comment:

  network.h    -> sockaddr_union, Address
  util.{h,cc}  -> timestamp(), straddr(), format_hex()
  shared.{h,cc}-> msghdr_get_local_addr(), set_port()

Two of them are simplified rather than transplanted verbatim: format_hex()
collapses from three iterator-constrained overloads plus a 512-byte lookup
table to one format_hex(const uint8_t*, size_t), as both call sites only ever
pass cid.data/cid.datalen, and straddr() reports through loge() and builds its
result with std::format instead of std::cerr and manual appends.

h3_session.cpp is already in anyhttp::http3 and calls them unqualified;
h3_server.cpp and h3_client.cpp pull the names in with using declarations
alongside the existing log_headers/make_nv ones. to_ngtcp2_address() becomes
to_address(), the type it produces no longer being ngtcp2::Address.

The vendored sources drop out of src/CMakeLists.txt (the *.cpp glob covers
h3_common.cpp) and out of the coverage ignore regex. src/ngtcp2/README.md also
noted that the devcontainer installs the upstream examples as osslclient and
osslserver; that note moves to HTTP3.md, where it already pointed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@pgit
pgit merged commit 5d94800 into master Sep 7, 2026
0 of 4 checks passed
@pgit
pgit deleted the cleanup branch September 7, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant