Skip to main content

Crate krot_transport

Crate krot_transport 

Source
Expand description

QUIC transport layer for KROT.

Wires the byte-level protocol from krot_proto onto quinn streams with the ALPN and transport parameters mandated by §2 and §11.

§Modules

  • endpoint — KrotEndpoint wrapper around quinn::Endpoint, pre-configured with krot/1 ALPN, 5s keep-alive, 15s idle timeout, and the recommended stream/connection windows.
  • frame — asynchronous readers and writers for the length-prefixed postcard frames that flow on Control streams.
  • relay — BidiStream adapter combining quinn::SendStream and quinn::RecvStream into a single AsyncRead + AsyncWrite, plus relay::run_bidirectional for the byte-shovel between a QUIC stream and a local TCP socket.

§rustls crypto provider

rustls 0.23 requires a process-wide crypto provider to be installed before any TLS configuration is constructed. Call install_crypto_provider once at binary startup.

Re-exports§

pub use conn::Connection;
pub use conn::Incoming;
pub use conn::RecvStream;
pub use conn::SendStream;
pub use conn::TransportKind;
pub use endpoint::client_transport_config;
pub use endpoint::server_transport_config;
pub use endpoint::KrotEndpoint;
pub use error::TransportError;
pub use frame::read_frame;
pub use frame::write_frame;
pub use relay::run_bidirectional;
pub use relay::run_bidirectional_with_first_byte_deadline;
pub use relay::BidiStream;
pub use tcp_listener::connect_tcp_fallback;
pub use tcp_listener::TcpFallbackListener;
pub use tcp_mux::TcpMuxConn;
pub use tcp_mux::TcpMuxRecvStream;
pub use tcp_mux::TcpMuxSendStream;
pub use krot_proto;

Modules§

conn
Transport-agnostic wrappers over quinn::Connection and its streams (§16.1.2).
endpoint
KrotEndpoint: a thin wrapper around quinn::Endpoint that guarantees the ALPN identifier and transport parameters required by wire protocol spec.
error
Transport-layer error type shared by the endpoint, frame and relay modules.
frame
Asynchronous length-prefixed frame reader/writer over quinn streams.
relay
Adapters that pair a quinn bidirectional stream with a local tokio::net::TcpStream for a full-duplex byte relay.
tcp_listener
§16.1.4 server-side TCP+TLS listener for the krot-tcp/1 fallback transport.
tcp_mux
§16.1.3 TCP-mux transport.

Functions§

install_crypto_provider
Install rustls’s ring-backed crypto provider as the process default.