Expand description
A wrapper for an AsyncRead to support XON/XOFF flow control.
This allows any AsyncRead that implements BufferIsEmpty to be used with XON/XOFF flow
control.
Re-exportsยง
use std::io::Error;๐use std::pin::Pin;๐use std::task::Context;๐use std::task::Poll;๐use futures::AsyncRead;๐use futures::Stream;๐use pin_project::pin_project;๐use tor_basic_utils::assert_val_impl_trait;๐use tor_cell::relaycell::flow_ctrl::XonKBpsEwma;๐use crate::stream::StreamTarget;๐use crate::util::notify::NotifyReceiver;๐
Structsยง
- Drain
Rate ๐Request - A marker type for a
NotifySenderindicating that notifications are for new drain rate requests. - XonXoff
Reader ๐ - A wrapper for an
AsyncReadto support XON/XOFF flow control. - XonXoff
Reader ๐Ctrl - The control structure for a stream that partakes in XON/XOFF flow control.
Traitsยง
- Buffer
IsEmpty ๐ - Used by the
XonXoffReaderto decide when to send a drain rate update (typically resulting in an XON message). - Drain
Rate ๐Notifier - Something that sends drain rate updates to the flow control logic (the
XonXoffFlowCtrl).