Struct tor_proto::stream::StreamParameters [−][src]
pub struct StreamParameters { /* fields omitted */ }Expand description
A set of preferences used to declare how a new stream should be opened.
Implementations
Create a new StreamParameters using default settings.
Configure which IP version (IPv4 or IPv6) you’d like to request, if you’re connecting to a hostname.
The default is to allow either version, but to prefer IPv4.
Configure whether the stream should be opened “optimistically.”
By default, streams are not “optimistic”. When you call
ClientCirc::begin_stream(),
the function won’t give you a stream until the exit node has
confirmed that it has successfully opened a connection to your
target address. It’s safer to wait in this way, but it is slower:
it takes an entire round trip to get your confirmation.
If a stream is configured to be “optimistic”, then
ClientCirc::begin_stream() will return the stream
immediately, without waiting for an answer from the exit. You
can start sending data on the stream right away, though of
course this data will be lost if the connection is not
actually successful.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for StreamParameters
impl Send for StreamParameters
impl Sync for StreamParameters
impl Unpin for StreamParameters
impl UnwindSafe for StreamParameters
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more