Skip to main content

Module wire

Module wire 

Source
Expand description

What left the process, and bounded reading of what came back.

SentTracker knows whether any request byte may have left the process. It is a one-way state machine shared between the connection and the attempt: the connection must win SentTracker::begin_write before its first request byte, and the attempt wins SentTracker::try_abort only if no write ever began, after which none can. That is what lets an adapter acknowledge stopped for an unsent request without a race (spec 009, 3.4.3). Handshake bytes (TLS) are below the tracked layer and are not request bytes.

Structs§

IoHooks
What a tracked stream reports to: the exchange’s SentTracker and, under an enabled phase policy, its phase clock (spec 020, 3.4). A pooled connection (spec 020, 3.5) carries several exchanges, one at a time, so its hooks are swapped for each.
SentTracker
Whether request bytes may have left the process. Clones share state.
TrackedIo
A stream whose writes are tracked by a SentTracker. Wrap the layer that carries request bytes: plain TCP, or the plaintext side of TLS.

Functions§

digest_bytes
sha256: and the lowercase hex digest of bytes, for exchange records.

Type Aliases§

SharedHooks
Hooks shared by a stream and the exchanges that use it.