Module reactor

Source
Expand description

Code to handle incoming cells on a circuit.

§On message validation

There are three steps for validating an incoming message on a stream:

  1. Is the message contextually appropriate? (e.g., no more than one CONNECTED message per stream.) This is handled by calling CmdChecker::check_msg.
  2. Does the message comply with flow-control rules? (e.g., no more data than we’ve gotten SENDMEs for.) For open streams, the stream itself handles this; for half-closed streams, the reactor handles it using the halfstream module.
  3. Does the message have an acceptable command type, and is the message well-formed? For open streams, the streams themselves handle this check. For half-closed streams, the reactor handles it by calling consume_checked_msg().

Modules§

circuit 🔒
Module exposing types for representing circuits in the tunnel reactor.
conflux 🔒
Conflux-related functionality
control 🔒
Module providing CtrlMsg.
syncview 🔒
Implement synchronous views of circuit internals.

Macros§

unwrap_or_shutdown 🔒
Unwrap the specified Option, returning a ReactorError::Shutdown if it is None.

Structs§

CellHandlers 🔒
Cell handlers, shared between the Reactor and its underlying Circuits.
ConfluxHandshakeCtx 🔒 conflux
The context for an on-going conflux handshake.
ConfluxHeapEntry 🔒 conflux
An out-of-order message buffered in Reactor::ooo_msgs.
IncomingStreamRequestHandler 🔒 hs-service
Data required for handling an incoming stream request.
LegId 🔒
A unique identifier for a circuit leg.
LegIdKey 🔒
A key type for the circuit leg slotmap
NoHopsBuiltError 🔒
The tunnel does not have any hops.
NoJoinPointError 🔒
The tunnel does not have a join point.
Reactor
Object to handle incoming cells and background tasks on a circuit
SendRelayCell 🔒
Cmd for sending a relay cell.
StreamReqInfo 🔒 hs-service
Information about an incoming stream request.

Enums§

CircuitAction 🔒
A command to execute at the end of Reactor::run_once.
CircuitHandshake 🔒
A handshake type, to be used when creating circuit hops.
CloseStreamBehavior 🔒
A behavior to perform when closing a stream.
MetaCellDisposition
A possible successful outcome of giving a message to a MsgHandler.
RemoveLegReason 🔒
The reason for removing a circuit leg from the conflux set.
RunOnceCmd 🔒
One or more RunOnceCmdInner to run inside Reactor::run_once.
RunOnceCmdInner 🔒
Instructions for running something in the reactor loop.

Traits§

MetaCellHandler 🔒
An object that’s waiting for a meta cell (one not associated with a stream) in order to make progress.

Functions§

send_conflux_outcome 🔒 conflux
Notify the conflux handshake initiator of the handshake outcome.

Type Aliases§

ConfluxHandshakeResult 🔒 conflux
Contains a list of conflux handshake results.
ConfluxLinkResultChannel 🔒 conflux
The type of oneshot channel used to inform reactor users of the outcome of a client-side conflux handshake.
ReactorResultChannel 🔒
The type of a oneshot channel used to inform reactor of the result of an operation.
StreamReqSender 🔒 hs-service
MPSC queue containing stream requests