JFLib

netio crate root#

Re-exports: x509

Re-exports: x509::der

  • trait Stream: Send + Sync a 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 end
    • fn 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 side
    • fn wait_readable(&self, _ms: u32) -> bool whether bytes (or the end) can be read within ms
    • fn end_is_clean(&self) -> bool after 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

Source: docs/API.md in the JFLib repository.