refactor(http3): delegate H3 stack to erlang_quic / quic_h3#841
Merged
refactor(http3): delegate H3 stack to erlang_quic / quic_h3#841
Conversation
Hackney's hand-rolled HTTP/3 framing, QPACK codec, control stream and
QPACK encoder/decoder stream handling are removed in favour of the
quic_h3 module shipped in erlang_quic's feat/http3 branch.
- src/hackney_quic.erl rewritten as a ~270 LOC gen_server adapter that
translates {quic_h3, Conn, _} events into the existing
{quic, ConnRef, _} protocol consumed by hackney_conn.
- Public hackney_quic API now exposes send_request/3 (atomic stream
open + HEADERS) instead of the open_stream/1 + send_headers/4 pair;
hackney_h3 updated accordingly.
- src/hackney_qpack.erl removed (~622 LOC); QPACK lives in quic_qpack.
- H3 peername/sockname/setopts/peercert now return {error, not_supported}
since quic_h3 does not expose them.
- rebar.config: quic dep tracks erlang_quic feat/http3 branch.
Collapses the thin quic adapter and the h3 high-level module into a
single hackney_h3. Public low-level message tag renamed from
{quic, ConnRef, _} to {h3, ConnRef, _}; public low-level API moves
from hackney_quic: to hackney_h3:. Updates hackney_conn, tests, xref
config, and docs accordingly.
Switch the quic dep from the feat/http3 git branch to the first hex release of erlang_quic (1.0.0). No source changes required; H3 eunit suite passes unchanged.
Wires the three calls through to the underlying quic connection via
quic_h3:get_quic_conn/1 (available since quic 1.0.0). setopts still
returns {error, not_supported} since QUIC has no {active, once}-style
socket model.
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.
Replaces hackney's HTTP/3 framing, QPACK and control-stream code (~1.8k LOC) with
quic_h3from erlang_quic, now pinned to hexquic1.0.0.Further cleanup in this branch:
hackney_quic.erlmerged intohackney_h3.erl; single module holds both the high-level request API and the gen_server adapter overquic_h3.{quic, ConnRef, _}→{h3, ConnRef, _}; public low-level API moves fromhackney_quic:tohackney_h3:(connect/4,send_request/3,send_data/4,reset_stream/3,close/2,process/1).peername/sockname/setopts/peercertreturn{error, not_supported}(not exposed byquic_h3).xref, dialyzer green. H3 eunit suite 50/50; broader eunit 886/886.