Expand description
Various network IO-related utilities
Structs§
- Async
Read Streamer - Converts a [
AsyncRead
] intofutures::Stream
by reading at mostS
bytes in each call toStream::poll_next
. - Async
Write Sink - Wraps a [
futures::Sink
] that acceptsBox<[u8]>
with an [AsyncWrite
] interface, with each write to the underlyingSink
being at mostC
bytes. - DuplexIO
- Joins [
futures::AsyncRead
] and [futures::AsyncWrite
] into a single object.
Functions§
- copy_
duplex - This is a proper re-implementation of Tokio’s
copy_bidirectional_with_sizes
, which does not leave the stream in half-open-state when one side closes read or write side. - copy_
duplex_ abortable - Variant of
copy_duplex
with an option to abort either side early using the givenAbortRegistrations
.