Module datagram
Available on crate features
http and std only.Expand description
HTTP Datagrams and the Capsule Protocol (RFC 9297), shared by every HTTP version.
HttpDatagramSession runs on the upgraded I/O of any successful HTTP/1.x upgrade or
HTTP/2 and HTTP/3 Extended CONNECT. It sends DATAGRAM and control capsules on the
reliable data stream and, when the transport publishes NativeDatagrams (HTTP/3 with
negotiated QUIC DATAGRAM), unreliable native datagrams. handshake maps an upgrade
token onto each HTTP version; nothing above the session needs a version switch.
Modules§
- capsule
- Bounded, incremental Capsule Protocol decoding (RFC 9297 §3).
- handshake
- Upgrade-token handshakes for protocols that use the Capsule Protocol (RFC 9297 §3.2).
Structs§
- Http
Datagram Session - An HTTP Datagram and Capsule Protocol session on an established request.
- Native
Datagrams - A request’s native datagram carrier, published on the upgraded I/O’s extensions.
- Session
Config - Configuration of an
HttpDatagramSession. - Session
Receiver - The receiving half of an
HttpDatagramSession. - Session
Sender - The sending half of an
HttpDatagramSession.
Enums§
- Datagram
Transport - How an HTTP Datagram travelled.
- Native
Recv Error - The receive side of a native association ended abnormally.
- Native
Send Error - A native datagram could not be handed to the transport.
- Native
Send Policy - How a native send behaves when the transport’s datagram buffer is full.
- Session
Error - A session operation failed.
- Session
Event - An event received on a session.
- Violation
Policy - How peer violations of HTTP Datagram rules that do not affect framing are handled.
Traits§
- Native
Datagram Channel - Unreliable delivery of HTTP Datagrams associated with one request, such as HTTP/3 QUIC DATAGRAM frames (RFC 9297 §2.1).