Expand description
Low-level protocol logic for the QUIC protoocol
quinn-proto contains a fully deterministic implementation of QUIC protocol logic. It contains no networking code and does not get any relevant timestamps from the operating system. Most users may want to use the futures-based quinn API instead.
The quinn-proto API might be of interest if you want to use it from a C or C++ project through C bindings or if you want to use a different event loop than the one tokio provides.
The most important types are Endpoint
, which conceptually represents the protocol state for
a single socket and mostly manages configuration and dispatches incoming datagrams to the
related Connection
. Connection
types contain the bulk of the protocol logic related to
managing a single connection and all the related state (such as streams).
Modules§
- coding
- Coding related traits.
- congestion
- Logic for controlling the rate at which data is sent
- crypto
- Traits and implementations for the QUIC cryptography protocol
- transport_
parameters - QUIC connection transport parameters
Structs§
- Accept
Error - Error type for attempting to accept an
Incoming
- AckFrequency
Config - Parameters for controlling the peer’s acknowledgement frequency
- Application
Close - Reason given by an application for closing the connection
- Chunk
- A chunk of data from the receive stream
- Chunks
- Chunks returned from
RecvStream::read()
. - Client
Config - Configuration for outgoing connections
- Closed
Stream - Error indicating that a stream has not been opened or has already been finished or reset
- Connection
- Protocol state and logic for a single QUIC connection
- Connection
Close - Reason given by the transport for closing the connection
- Connection
Event - Events sent from an Endpoint to a Connection
- Connection
Handle - Internal identifier for a
Connection
currently associated with an endpoint - Connection
Id - Protocol-level identifier for a connection.
- Connection
Stats - Connection statistics
- Datagram
- An unreliable datagram
- Datagrams
- API to control datagram traffic
- Endpoint
- The main entry point to the library
- Endpoint
Config - Global configuration for the endpoint, affecting all connections
- Endpoint
Event - Events sent from a Connection to an Endpoint
- Fixed
Length Connection IdParser - A
ConnectionIdParser
implementation that assumes the connection ID is of fixed length - Frame
Stats - Number of frames transmitted of each frame type
- Frame
Type - A QUIC frame type
- Hashed
Connection IdGenerator - Generates 8-byte connection IDs that can be efficiently
validate
d - 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.
- Invalid
Cid - The connection ID was not recognized by the
ConnectionIdGenerator
- 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 - Partial
Decode - Decodes a QUIC packet’s invariant header
- Path
Stats - Statistics related to a transmission path
- Protected
Initial Header - Header of an Initial packet, before decryption
- Random
Connection IdGenerator - Generates purely random connection IDs of a specified length
- Recv
Stream - Access to streams
- Retry
Error - Error for attempting to retry an
Incoming
which already bears a token from a previous retry - RttEstimator
- RTT estimation for a particular network path
- Send
Stream - Access to streams
- Server
Config - Parameters governing incoming connections
- Should
Transmit - Indicates whether a frame needs to be transmitted
- StdSystem
Time - Default implementation of
TimeSource
- Stream
Id - Identifier for a stream within a particular connection
- Streams
- Access to streams
- Token
Reuse Error - Error for when a validation token may have been reused
- Transmit
- An outgoing packet
- 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
VarInt
from a value >= 2^62 - Written
- Indicates how many bytes and chunks had been transferred in a write operation
Enums§
- Config
Error - Errors in the configuration of an endpoint
- Connect
Error - Errors in the parameters being used to create a new connection
- Connection
Error - Reasons why a connection might be lost
- Datagram
Event - Event resulting from processing a single datagram
- Dir
- Whether a stream communicates data in both directions or only from the initiator
- EcnCodepoint
- Explicit congestion notification codepoint
- Event
- Events of interest to the application
- Finish
Error - Reasons why attempting to finish a stream might fail
- Long
Type - Long packet types with uniform header structure
- Packet
Decode Error - Packet decode error
- Protected
Header - Plain packet header
- Read
Error - Errors triggered when reading from a recv stream
- Readable
Error - Errors triggered when opening a recv stream for reading
- Send
Datagram Error - Errors that can arise when sending a datagram
- Side
- Whether an endpoint was the initiator of a connection
- Stream
Event - Application events about streams
- Write
Error - Errors triggered while writing to a send stream
Constants§
- DEFAULT_
SUPPORTED_ VERSIONS - The QUIC protocol version implemented.
Traits§
- Bytes
Source - A source of one or more buffers which can be converted into
Bytes
buffers on demand - Connection
IdGenerator - Generates connection IDs for incoming connections
- Connection
IdParser - Parse connection id in short header packet
- 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