Module reactor

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 SENDMEs than we’ve sent data for.) This is handled within the reactor by the StreamFlowCtrl. For half-closed streams which don’t send stream SENDMEs, an additional receive-window check is performed in 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.
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

EnumsΒ§

CircuitEvent πŸ”’
A command to execute at the end of Reactor::run_once.
CircuitHandshake πŸ”’
A handshake type, to be used when creating circuit hops.
MetaCellDisposition
A possible successful outcome of giving a message to a MsgHandler.
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.