Skip to content

quic/api: introduce QuicPacketWriter interface and BufQuicBatchResult#449

Open
afrind wants to merge 2 commits into
facebook:mainfrom
afrind:quic-packet-writer-interface
Open

quic/api: introduce QuicPacketWriter interface and BufQuicBatchResult#449
afrind wants to merge 2 commits into
facebook:mainfrom
afrind:quic-packet-writer-interface

Conversation

@afrind
Copy link
Copy Markdown
Contributor

@afrind afrind commented May 15, 2026

Defines the write/flush/getResult contract for pluggable packet writers.
BufQuicBatchResult is moved from IoBufQuicBatch.h to break an include cycle
(IoBufQuicBatch → QuicBatchWriter → StateData). Adds conn.packetWriter
(unique_ptr) to QuicConnectionStateBase; null on all
existing paths. Conditionalizes write/flush sites on packetWriter so the
inline path is unchanged when no writer is installed.

afrind and others added 2 commits May 14, 2026 17:48
Uses eventfd on Linux (EFD_NONBLOCK; counter semantics coalesce multiple
flush() calls) and a non-blocking self-pipe on macOS. Wraps a lock-free
folly::ProducerConsumerQueue for the data path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Defines the write/flush/getResult contract for pluggable packet writers.
BufQuicBatchResult is moved from IoBufQuicBatch.h to break an include cycle
(IoBufQuicBatch → QuicBatchWriter → StateData). Adds conn.packetWriter
(unique_ptr<QuicPacketWriter>) to QuicConnectionStateBase; null on all
existing paths. Conditionalizes write/flush sites on packetWriter so the
inline path is unchanged when no writer is installed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label May 15, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 15, 2026

@afrind has imported this pull request. If you are a Meta employee, you can view this in D105347776.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant