Module stack_epic_util::read_write
source · Expand description
Custom impls of read_exact and write_all to work around async stream restrictions.
Functions
The default implementation of read_exact is useless with an async stream (TcpStream) as
it will return as soon as something has been read, regardless of
whether the buffer has been filled (and then errors). This implementation
will block until it has read exactly
len bytes and returns them as a
vec<u8>. Except for a timeout, this implementation will never return a
partially filled buffer.Same as
read_exact but for writing.