std only.Expand description
Client-First Transport Session
PhantomSession is the user-facing client session: connect_with_transport
returns instantly and spawns a background task that drives the hybrid
post-quantum handshake and then the data pump, with send() calls queued
in-memory until the handshake completes. It is the transport-level API that
sits directly above a SessionTransport byte-pipe (PhantomUDP / TCP /
WebSocket / WASI / Embedded / MimicTls) and below any application protocol an
embedder layers on top of send() / recv().
This file also carries the shared client/server data pump (run_data_pump)
and every per-packet build/parse helper (send_app_data, handle_packet,
the keep-alive / cover / window-update / path-validation senders), so any
change to encrypt/decrypt, framing, or stream routing happens here, in one
place, for both sides.
Re-exports§
pub use crate::transport::session_transport::FramePhase;pub use crate::transport::session_transport::SessionTransport;
Structs§
- Phantom
Session - Client-first session — instant construction, non-blocking
send(). - Resumption
Hint - 0-RTT resumption material extracted from a completed session.
- Traffic
Shaping Config - Anti-fingerprint traffic-shaping configuration (WIRE v6, direction #4). Set on
an established session via
PhantomSession::set_traffic_shaping. All shaping is opt-in — the default (and the field defaults here) is no shaping, so a session pays nothing unless an embedder enables it.
Enums§
- Connection
State - Connection state for
PhantomSession. - Session
Command - Commands for the background session task
Functions§
- connect_
pinned - connect_
pinned_ mimic mimicryand non-WebAssembly - Connect to a pinned server over the TLS-over-TCP active-mimicry transport
(
mimicryfeature) — the flow looks like an ordinary HTTPS handshake to an on-path observer, while the real authentication / confidentiality remains the inner Phantom post-quantum session. - connect_
pinned_ with_ resumption - Connect to a pinned server with a 0-RTT resumption attempt — the
resumption-aware analogue of
connect_pinned.