Expand description
Tor stream handling.
A stream is an anonymized conversation; multiple streams can be multiplexed over a single circuit.
Re-exportsΒ§
use futures::SinkExt as _;πuse oneshot_fused_workaround as oneshot;πuse postage::watch;πuse safelog::sensitive;πuse tor_async_utils::SinkCloseChannel as _;πuse tor_cell::relaycell::flow_ctrl::XonKBpsEwma;πuse tor_cell::relaycell::msg::AnyRelayMsg;πuse tor_cell::relaycell::msg::End;πuse tor_cell::relaycell::msg::Resolved;πuse tor_cell::relaycell::RelayCellFormat;πuse tor_cell::relaycell::StreamId;πuse tor_cell::relaycell::UnparsedRelayMsg;πuse tor_memquota::mq_queue;πuse tor_memquota::mq_queue::MpscSpec;πuse flow_ctrl::state::StreamRateLimit;πuse crate::memquota::StreamAccount;πuse crate::stream::flow_ctrl::xon_xoff::reader::XonXoffReaderCtrl;πuse crate::ClientTunnel;πuse crate::Error;πuse crate::HopLocation;πuse crate::Result;πpub use incoming::IncomingStream;pub use incoming::IncomingStreamRequest;pub use incoming::IncomingStreamRequestContext;pub use incoming::IncomingStreamRequestDisposition;pub use incoming::IncomingStreamRequestFilter;pub use raw::StreamReceiver;pub(crate) use incoming::InboundDataCmdChecker;πpub(crate) use incoming::IncomingCmdChecker;πpub(crate) use incoming::StreamReqInfo;πuse std::pin::Pin;πuse std::sync::Arc;π
ModulesΒ§
- cmdcheck π
- Declare a βcommand checkerβ trait that checks whether a given relay message is acceptable on a given stream.
- flow_
ctrl π - Stream flow control.
- incoming π
- Incoming data stream cell handlers, shared by the relay and onion service implementations.
- queue π
- Queues for stream messages.
- raw π
- Declare the lowest level of stream: a stream that operates on raw cells.
StructsΒ§
- Stream
Components π - A collection of components that can be combined to implement a Tor stream, or anything that requires a stream ID.
- Stream
Target π - Internal handle, used to implement a stream on a particular tunnel.
EnumsΒ§
- Close
Stream πBehavior - A behavior to perform when closing a stream.
- Tunnel π
- A client or relay tunnel.
ConstantsΒ§
- RECV_
WINDOW_ πINIT - Initial value for inbound flow-control window on streams.
- SEND_
WINDOW_ πINIT - Initial value for outbound flow-control window on streams.
- STREAM_
READER_ πBUFFER - Size of the buffer used between the reactor and a
StreamReader.
FunctionsΒ§
- msg_
streamid π - Return the stream ID of
msg, if it has one.
Type AliasesΒ§
- Stream
Mpsc πReceiver - MPSC queue relating to a stream (either inbound or outbound), receiver
- Stream
Mpsc πSender - MPSC queue relating to a stream (either inbound or outbound), sender