Skip to main content

Module stream

Module stream 

Source
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Β§

StreamComponents πŸ”’
A collection of components that can be combined to implement a Tor stream, or anything that requires a stream ID.
StreamTarget πŸ”’
Internal handle, used to implement a stream on a particular tunnel.

EnumsΒ§

CloseStreamBehavior πŸ”’
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Β§

StreamMpscReceiver πŸ”’
MPSC queue relating to a stream (either inbound or outbound), receiver
StreamMpscSender πŸ”’
MPSC queue relating to a stream (either inbound or outbound), sender