Crate quic
Available on crate features
quic and std only.Expand description
QUIC v1 (RFC 9000) transport for Rama.
The deterministic protocol engine lives in the private proto module and
the asynchronous connection driver in driver; only Rama-owned types are
part of this crate’s public API.
UDP I/O is provided by rama_udp; TLS 1.3 comes from the common
[rama_tls] configuration converted through rama-tls-rustls.
§Rama
Crate used by the end-user rama crate and rama crate authors alike.
Learn more about rama:
- Github: https://github.com/plabayo/rama
- Book: https://ramaproxy.org/book/
Modules§
- qlog
- Typed QUIC diagnostics with optional async recording.
- tls
rustlsand (aws-lcorring) - TLS for QUIC: how a connection’s identity and application protocol are configured.
Structs§
- Accept
- Future produced by
Endpoint::accept - Accept
Bi - Future produced by
Connection::accept_bi - Accept
Uni - Future produced by
Connection::accept_uni - AckFrequency
Config - Parameters for controlling the peer’s acknowledgement frequency
- Address
Token Key aws-lcorring - The key a server seals address-validation tokens with (RFC 9000 §8.1).
- Application
Close - Reason given by an application for closing the connection
- Bloom
Token Log - Bloom filter-based
TokenLog - Chunk
- A chunk of data from the receive stream
- Client
Config - Configuration for outgoing connections
- Closed
Stream - Error indicating that a stream has not been opened or has already been finished or reset. closed stream
- Connecting
- In-progress connection attempt future
- Connection
- A QUIC connection.
- Connection
Close - Reason given by the transport for closing the connection
- Connection
Id - Protocol-level identifier for a connection.
- Connection
Stats - Connection statistics
- Driver
Stats - Socket and receive-queue statistics for one connection, counted by the driver around the
protocol engine. What the engine itself counts is
ConnectionStats. - Endpoint
- A QUIC endpoint.
- Endpoint
Builder - An endpoint being built: the runtime it will live on, what it is configured with, and the socket it will bind.
- Endpoint
Config - Global configuration for the endpoint, affecting all connections
- Endpoint
Stats - Statistics on Endpoint activity
- Export
Keying Material Error - The requested output length exceeds the exporter’s limit. failed to export keying material
- Frame
Stats - Number of frames transmitted or received of each frame type
- Frame
Type - A QUIC frame type
- Handshake
Summary - Negotiated ALPN and received server name reported by the TLS backend.
- Hashed
Connection IdGenerator - Generates 8-byte connection IDs that can be efficiently
validated - Idle
Timeout - Maximum duration of inactivity to accept before timing out the connection
- Incoming
- An incoming connection for which the server has not yet begun its part of the handshake
- Incoming
Future - Basic adapter to let
Incomingbeawait-ed like aConnecting - Invalid
Cid - connection ID was not recognized by the connection ID generator
- MtuDiscovery
Config - Parameters governing MTU discovery.
- None
Token Log - Null implementation of
TokenLog, which never accepts tokens - None
Token Store - Null implementation of
TokenStore, which does not store any tokens - OpenBi
- Future produced by
Connection::open_bi - OpenUni
- Future produced by
Connection::open_uni - Packet
Queue Stats - Occupancy and drop counters of a queue of received packets.
- Path
Stats - Statistics related to a transmission path
- Random
Connection IdGenerator - Generates purely random connection IDs of a specified length
- Read
Datagram - Future produced by
Connection::read_datagram - Receive
Queue Limits - Bounds for received packets queued between the endpoint driver and a connection driver.
- Recv
Stream - A stream that can only be used to receive data
- Retry
Error - Error for a Retry that was not sent; the
Incomingis handed back for another decision - Send
Datagram - Future produced by
Connection::send_datagram_wait - Send
Stream - A stream that can only be used to send data
- Server
Config - Parameters governing incoming connections
- Stateless
Reset Key - The key an endpoint derives the stateless reset tokens it issues from (RFC 9000 §10.3).
- StdSystem
Time - Default implementation of
TimeSource - Stream
Id - Identifier for a stream within a particular connection
- Token
Memory Cache TokenStoreimplementation that stores up toNtokens per server name for up to a limited number of server names, in-memory- Token
Reuse Error - validation token may have been reused
- Transport
Config - Parameters governing the core QUIC state machine
- Transport
Error - Transport-level errors occur when a peer violates the protocol specification
- Transport
Error Code - Transport-level error code
- UdpStats
- Statistics about UDP datagrams transmitted or received on a connection
- Validation
Token Config - Configuration for sending and handling validation tokens in incoming connections
- VarInt
- An integer less than 2^62
- VarInt
Bounds Exceeded - Error returned when constructing a
VarIntfrom a value >= 2^62. value too large for varint encoding - Written
- Indicates how many bytes and chunks had been transferred in a write operation
- Zero
RttAccepted - Future that completes when a connection is fully established
Enums§
- Config
Error - Errors in the configuration of an endpoint
- Congestion
Control - Which congestion controller a connection’s paths use.
- Connect
Error - Errors in the parameters being used to create a new connection
- Connection
Error - Reasons why a connection might be lost
- Dir
- Whether a stream communicates data in both directions or only from the initiator
- EcnCodepoint
- Explicit congestion notification codepoint
- Preferred
Address Policy - How a client answers a server’s preferred address (RFC 9000 §9.6).
- Read
Error - Errors that arise from reading from a stream.
- Read
Exact Error - Errors that arise from reading from a stream.
- Read
ToEnd Error - Errors from
RecvStream::read_to_end - Reset
Error - Errors that arise while waiting for a stream to be reset
- Retry
Refused - Why a Retry was not sent
- Send
Datagram Error - Errors that can arise when sending a datagram
- Shutdown
Outcome - Side
- Whether an endpoint was the initiator of a connection
- Stopped
Error - Errors that arise while monitoring for a send stream stop from the peer
- Write
Error - Errors that arise from writing to a stream
Constants§
- DEFAULT_
SHUTDOWN_ BUDGET - How long a shutdown gives drivers to finish before it stops waiting and forces them.
- DEFAULT_
SUPPORTED_ VERSIONS - The QUIC protocol versions advertised and accepted by default: QUIC v1 only.
- KEY_
MATERIAL_ SIZE - Bytes of secret material accepted by the fixed-size key constructors.
- MAX_
CID_ SIZE - The longest connection ID QUIC version 1 carries, in bytes (RFC 9000 §17.2).
- MIN_
INITIAL_ CONGESTION_ WINDOW - The smallest initial congestion window this crate accepts: two datagrams of the size every QUIC path carries (RFC 9000 §14.1). It is a policy floor, not a protocol one; a window of zero was measured to leave a connection unable to complete its handshake.
Traits§
- Connection
IdGenerator - Generates connection IDs for incoming connections
- Time
Source - Object to get current
SystemTime - Token
Log - Responsible for limiting clients’ ability to reuse validation tokens
- Token
Store - Responsible for storing validation tokens received from servers and retrieving them for use in subsequent connections
Type Aliases§
- Connection
IdGenerator Factory - How an endpoint makes a connection ID generator: one call per endpoint, so each has its own state.