Add a new message status for sending HTTP Datagrams before SETTINGS are received.

Previously, `QuicSpdySession::SendHttp3Datagram` returned `MESSAGE_STATUS_INTERNAL_ERROR` if it was called before a SETTINGS frame was received. In this CL, I added a new enum called `MESSAGE_STATUS_SETTINGS_NOT_RECEIVED` to distinguish this case from other internal errors. This will allow a caller to take proper measures (e.g., drop or buffer datagrams) based on the return value of the method.

In QUICHE, callers report errors or log the `MESSAGE_STATUS_INTERNAL_ERROR`, so I added the `MESSAGE_STATUS_SETTINGS_NOT_RECEIVED` case in the callers to preserve the existing behavior.

In Envoy, `HttpDatagramHandler` is the only caller of the method. This change will not alter its behavior since both message statuses will be treated the same and reset the stream.

In Chromium, `QuicChromiumClientStream::Handle::WriteConnectUdpPayload()` treats both message statuses the same, so this CL will not change its behavior. After this CL is landed, the caller no longer needs to check `stream_->SupportsH3Datagram()` and instead can treat `MESSAGE_STATUS_SETTINGS_NOT_RECEIVED` the same way it treats `MESSAGE_STATUS_BLOCKED`.

PiperOrigin-RevId: 670652644
6 files changed
tree: a9adbb84d1907062cc807428e4fd7feda619086d
  1. build/
  2. depstool/
  3. quiche/
  4. .bazelrc
  5. .bazelversion
  6. BUILD.bazel
  7. CONTRIBUTING.md
  8. LICENSE
  9. README.md
  10. WHITESPACE
  11. WORKSPACE.bazel
README.md

QUICHE

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 CONTRIBUTING.md.

QUICHE is only supported on little-endian platforms.