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
CONNECTED
message per stream.) This is handled by callingCmdChecker::check_msg
. - 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. - 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::Shutdown
if it isNone
.
Structs§
- Cell
Handlers 🔒 - Cell handlers, shared between the Reactor and its underlying
Circuit
s. - 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
. - Incoming
Stream 🔒Request Handler hs-service
- Data required for handling an incoming stream request.
- LegId 🔒
- A unique identifier for a circuit leg.
- LegId
Key 🔒 - A key type for the circuit leg slotmap
- 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
- Send
Relay 🔒Cell - Cmd for sending a relay cell.
- Stream
ReqInfo 🔒hs-service
- Information about an incoming stream request.
Enums§
- Circuit
Action 🔒 - A command to execute at the end of
Reactor::run_once
. - Circuit
Handshake 🔒 - A handshake type, to be used when creating circuit hops.
- Close
Stream 🔒Behavior - A behavior to perform when closing a stream.
- Meta
Cell Disposition - A possible successful outcome of giving a message to a
MsgHandler
. - Remove
LegReason 🔒 - The reason for removing a circuit leg from the conflux set.
- RunOnce
Cmd 🔒 - One or more
RunOnceCmdInner
to 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.
- Stream
ReqSender 🔒hs-service
- MPSC queue containing stream requests