Module stream

Source
Expand description

Implements Tor’s “stream“s from a client perspective

A stream is an anonymized conversation; multiple streams can be multiplexed over a single circuit.

To create a stream, use crate::tunnel::circuit::ClientCirc::begin_stream.

§Limitations

There is no fairness, rate-limiting, or flow control.

Modules§

cmdcheck 🔒
Declare a “command checker” trait that checks whether a given relay message is acceptable on a given stream.
ctrl 🔒 stream-ctrl
Common types for StreamCtrl traits and objects, used to provide a shareable handle for controlling a string.
data 🔒
Declare DataStream, a type that wraps RawCellStream so as to be useful for byte-oriented communication.
flow_control 🔒
Code for implementing flow control (stream-level).
incoming 🔒 hs-service
Functionality for incoming streams, opened from the other side of a circuit.
params 🔒
Declares a type to configure new streams.
raw 🔒
Declare the lowest level of stream: a stream that operates on raw cells.
resolve 🔒
Declare a type for streams that do hostname lookups

Structs§

ClientDataStreamCtrlstream-ctrl
An object used to control and monitor a data stream.
DataReader
The read half of a DataStream, implementing [futures::io::AsyncRead].
DataStream
An anonymized stream over the Tor network.
DataWriter
The write half of a DataStream, implementing [futures::io::AsyncWrite].
IncomingStreamhs-service
A pending request from the other end of the circuit for us to open a new stream.
IncomingStreamRequestContexths-service
Information about a stream request, as passed to an IncomingStreamRequestFilter.
ResolveStream
A ResolveStream represents a pending DNS request made with a RESOLVE cell.
StreamParameters
A set of preferences used to declare how a new stream should be opened.
StreamReader
The read part of a stream on a particular circuit.

Enums§

IncomingStreamRequesths-service
The allowed incoming messages on an IncomingStream.
IncomingStreamRequestDispositionhs-service
What action to take with an incoming stream request.
IpVersionPreference
A preference for IPv4 vs IPv6 addresses; usable as a nicer frontend for BeginFlags.

Traits§

ClientStreamCtrlstream-ctrl
An object that lets the owner “control” a client stream.
IncomingStreamRequestFilterhs-service
A callback that can check whether a given stream request is acceptable immediately on its receipt.