pub async fn connect_pinned_with_resumption(
host: String,
port: u16,
pinned_key: Vec<u8>,
hint: ResumptionHint,
early_data: Vec<u8>,
) -> Result<Arc<PhantomSession>, CoreError>Expand description
Connect to a pinned server with a 0-RTT resumption attempt — the
resumption-aware analogue of connect_pinned.
hint is a ResumptionHint from a prior session’s
PhantomSession::resumption_hint; both of its fields must be
exactly 32 bytes or the call fails with ValidationError before any
socket is opened. early_data (≤ 16 KiB) is sealed into the resuming
ClientHello so it reaches the server on the very first flight.
Acceptance is best-effort: when the server does not consume the early-data
(stale/unknown ticket or AEAD failure) the handshake completes 1-RTT — the
caller checks PhantomSession::early_data_accepted and re-sends over the
normal channel when it is not Some(true).
Native-only, like connect_pinned: TcpSessionTransport lives
behind cfg(not(target_arch = "wasm32")).