Skip to main content

Module datagram

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§

HttpDatagramSession
An HTTP Datagram and Capsule Protocol session on an established request.
NativeDatagrams
A request’s native datagram carrier, published on the upgraded I/O’s extensions.
SessionConfig
Configuration of an HttpDatagramSession.
SessionReceiver
The receiving half of an HttpDatagramSession.
SessionSender
The sending half of an HttpDatagramSession.

Enums§

DatagramTransport
How an HTTP Datagram travelled.
NativeRecvError
The receive side of a native association ended abnormally.
NativeSendError
A native datagram could not be handed to the transport.
NativeSendPolicy
How a native send behaves when the transport’s datagram buffer is full.
SessionError
A session operation failed.
SessionEvent
An event received on a session.
ViolationPolicy
How peer violations of HTTP Datagram rules that do not affect framing are handled.

Traits§

NativeDatagramChannel
Unreliable delivery of HTTP Datagrams associated with one request, such as HTTP/3 QUIC DATAGRAM frames (RFC 9297 §2.1).