Skip to main content

Module transport

Module transport 

Source
Expand description

Transport abstraction.

The engine needs exactly four things from a connection: open and accept unidirectional streams (data), and open and accept a bidirectional stream (control). Anything providing those can carry a transfer — QUIC is the intended target, but the in-memory transport used by the test suite implements the same trait, and so can an existing connection you already own.

This is deliberately a dyn-compatible trait taking Boxed streams. The per-call cost is one virtual dispatch per stream, not per chunk, so it is invisible next to the I/O — and in exchange a host application can hand the engine its own live quinn::Connection instead of letting the engine dial its own.

Modules§

mem
In-process transport over tokio::io::duplex.
quic
QUIC transport backed by quinn.

Traits§

Transport

Type Aliases§

BoxRecv
Read half of a stream. Returns EOF when the peer finished it.
BoxSend
Write half of a stream. Call shutdown() to signal a clean end of stream.