Introduces new `Http2VisitorInterface` methods for DATA frame generation.

An outline of changes:
* Adds `Http2VisitorInterface::OnReadyToSendDataForStream()`, which the codec calls when it is ready to send a `DATA` frame; the visitor implementation indicates how many bytes can be sent in this frame.
* Adds `Http2VisitorInterface::SendDataFrame()`, which the codec calls with a frame header; the visitor implementation should send the frame header and then the indicated number of payload bytes.
* Replaces the existing "data provider" implementation with one that calls back through `NgHttp2Adapter`. This allows the adapter to forward the read callback to a `DataFrameSource`, if present for the stream, or to the visitor implementation otherwise.

This change brings the QUICHE `oghttp2` API more in line with its predecessor. Library users can continue to use the old behavior for now by passing a `DataFrameSource` to `SubmitRequest()`/`SubmitResponse()`.

At some point in the future, the `DataFrameSource` parameter will be removed, and all library users will have to use the new behavior.

PiperOrigin-RevId: 634047735
21 files changed
tree: 0ff0f3443f1c5bd5f64124b51f17a7261e6a4e7d
  1. build/
  2. depstool/
  3. quiche/
  4. .bazelrc
  5. .bazelversion
  6. BUILD.bazel
  11. WORKSPACE.bazel


QUICHE stands for QUIC, Http, Etc. It is Google‘s production-ready implementation of QUIC, HTTP/2, HTTP/3, and related protocols and tools. It powers Google’s servers, Chromium, Envoy, and other projects. It is actively developed and maintained.

There are two public QUICHE repositories. Either one may be used by embedders, as they are automatically kept in sync:

To embed QUICHE in your project, platform APIs need to be implemented and build files need to be created. Note that it is on the QUICHE team's roadmap to include default implementation for all platform APIs and to open-source build files. In the meanwhile, take a look at open source embedders like Chromium and Envoy to get started:

To contribute to QUICHE, follow instructions at

QUICHE is only supported on little-endian platforms.