Crate tquic

Source
Expand description

TQUIC is an implementation of the IETF QUIC protocol. It is a high-performance, lightweight, and cross-platform QUIC library.

§Features and Advantages

  • High Performance: TQUIC is designed for high performance and low latency.
  • High Throughput: TQUIC supports various congtestion control algorithms (CUBIC, BBR, COPA), and Multipath QUIC for utilizing multiple paths within a single connection.
  • High Quality: TQUIC employs extensive testing techniques, including unit testing, fuzz testing, integration testing, benchmarking, interoperability testing, and protocol conformance testing.
  • Easy to Use: TQUIC is easy to use, supporting flexible configuration and detailed observability. It offers APIs for Rust/C/C++.
  • Powered by Rust: TQUIC is written in a memory-safe language, making it immune to Buffer Overflow vulnerability and other memory-related bugs.
  • Rich Features: TQUIC supports all big features conforming with QUIC, HTTP/3 RFCs.

The TQUIC project website offers a comprehensive introduction to TQUIC.

§Get started

See the documents and examples to get started with TQUIC.

§Feature flags

TQUIC defines several feature flags to reduce the amount of compiled code and dependencies:

  • ffi: Build and expose the FFI API
  • qlog: Enable support for qlog
  • h3: Enable support for HTTP/3

Re-exports§

pub use crate::connection::path::Path;
pub use crate::connection::Connection;
pub use crate::endpoint::Endpoint;
pub use crate::error::Error;

Modules§

connection
Implementation of QUIC protocol.
endpoint
A QUIC endpoint.
error
Error type for quic operations.
h3
Implementation of HTTP/3 and QPACK.

Structs§

Config
Configurations about QUIC endpoint.
ConnectionId
Connection Id is an identifier used to identify a QUIC connection at an endpoint.
FourTuple
Address tuple.
FourTupleIter
An iterator over FourTuple.
PacketHeader
QUIC packet header.
PacketInfo
Meta information about a packet.
PathStats
Statistics about path
RandomConnectionIdGenerator
Generates purely random connection IDs of a certain length
TlsConfig

Enums§

CongestionControlAlgorithm
Available congestion control algorithms.
MultipathAlgorithm
Available multipath scheduling algorithms.
PathEvent
Important events about path
Shutdown
The stream’s side to shutdown.

Constants§

MAX_CID_LEN
The Connection ID MUST NOT exceed 20 bytes in QUIC version 1. See RFC 9000 Section 17.2
MIN_CLIENT_INITIAL_LEN
The minimum length of Initial packets sent by a client.
QUIC_VERSION
The current QUIC wire version.
QUIC_VERSION_V1
The QUIC Version 1
TIMER_GRANULARITY
The RECOMMENDED value of the timer granularity is 1 millisecond. See RFC 9002 Section 6.1

Traits§

ConnectionIdGenerator
Generate QUIC connection ID
PacketSendHandler
The PacketSendHandler lists the callbacks used by the endpoint to send packet out.
TlsConfigSelector
Used for selecting TLS config according to SNI.
TransportHandler
The TransportHandler lists the callbacks used by the endpoint to communicate with the user application code.

Type Aliases§

Result
Result type for quic operations.