pub struct Sendme { /* private fields */ }
Expand description
A Sendme message is used to increase flow-control windows.
To avoid congestion, each Tor circuit and stream keeps track of a number of data cells that it is willing to send. It decrements these numbers every time it sends a cell. If these numbers reach zero, then no more cells can be sent on the stream or circuit.
The only way to re-increment these numbers is by receiving a Sendme cell from the other end of the circuit or stream.
For security, current circuit-level Sendme cells include an authentication tag that proves knowledge of the cells that they are acking.
See tor-spec.txt for more
information; also see the source for tor_proto::circuit::sendme
.
Implementations
Trait Implementations
sourceimpl Body for Sendme
impl Body for Sendme
sourcefn into_message(self) -> RelayMsg
fn into_message(self) -> RelayMsg
Convert this type into a RelayMsg, wrapped appropriate.
sourcefn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
Decode a relay cell body from a provided reader.
sourcefn encode_onto(self, w: &mut Vec<u8>)
fn encode_onto(self, w: &mut Vec<u8>)
Encode the body of this cell into the end of a vec.
Auto Trait Implementations
impl RefUnwindSafe for Sendme
impl Send for Sendme
impl Sync for Sendme
impl Unpin for Sendme
impl UnwindSafe for Sendme
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more