netio crate root#
Re-exports: x509
Re-exports: x509::der
trait Stream: Send + Synca byte stream HTTP runs over (shared between a reader and a writer: &self methods)fn read(&self, buf: &mut [u8]) -> NetResult<usize>up to buf.len() bytes; Ok(0) at the endfn write_all(&self, buf: &[u8]) -> NetResult<()>fn set_timeouts(&self, read_ms: Option<u32>, write_ms: Option<u32>)timeouts for the following reads / writes (None: block)fn shutdown(&self)no more writes from this sidefn wait_readable(&self, _ms: u32) -> boolwhether bytes (or the end) can be read withinmsfn end_is_clean(&self) -> boolafter read gave Ok(0): whether the peer ended the stream in order. TLS: only after its close_notify -- a TCP end without one may be an attacker cutting a body that runs to the end of the connection (HTTP without a length). Plain streams: always