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:
- Is the message contextually appropriate? (e.g., no more than one
CONNECTEDmessage per stream.) This is handled by callingCmdChecker::check_msg. - 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 thehalfstreammodule. - 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 aReactorError::Shutdownif it isNone.
StructsΒ§
- Cell
Handlers π - Cell handlers, shared between the Reactor and its underlying
Circuits. - Conflux
Handshake πCtx conflux - The context for an on-going conflux handshake.
- Conflux
Heap πEntry conflux - An out-of-order message buffered in
Reactor::ooo_msgs. - NoHops
Built πError - The tunnel does not have any hops.
- NoJoin
Point πError - The tunnel does not have a join point.
- Reactor
- Object to handle incoming cells and background tasks on a circuit
EnumsΒ§
- Circuit
Event π - A command to execute at the end of
Reactor::run_once. - Circuit
Handshake π - A handshake type, to be used when creating circuit hops.
- Meta
Cell Disposition - A possible successful outcome of giving a message to a
MsgHandler. - RunOnce
Cmd π - One or more
RunOnceCmdInnerto run insideReactor::run_once. - RunOnce
CmdInner π - Instructions for running something in the reactor loop.
TraitsΒ§
- Meta
Cell πHandler - 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Β§
- Conflux
Handshake πResult conflux - Contains a list of conflux handshake results.
- Conflux
Link πResult Channel conflux - The type of oneshot channel used to inform reactor users of the outcome of a client-side conflux handshake.
- Reactor
Result πChannel - The type of a oneshot channel used to inform reactor of the result of an operation.