pub trait SessionIo:
Read
+ Write
+ Send {
// Provided methods
fn set_read_timeout(&mut self, _d: Option<Duration>) -> bool { ... }
fn set_nonblocking(&mut self, _on: bool) -> bool { ... }
}Expand description
A byte-stream session: TCP directly, or any registry transport
(e.g. noise) wrapped in confium_net::io::TransportIo.
Provided Methods§
Sourcefn set_read_timeout(&mut self, _d: Option<Duration>) -> bool
fn set_read_timeout(&mut self, _d: Option<Duration>) -> bool
Best-effort read timeout. Returns false when unsupported
(non-socket transports are message-framed and their recv
blocks only for the next message, which is the desired
behavior for a caller that previously set a socket timeout).
Prefer the polling deadline adapter over this hook: under MRI Ruby on windows-gnu the first recv on a socket carrying SO_RCVTIMEO fails WSAENOTSOCK (audit ledger).
Sourcefn set_nonblocking(&mut self, _on: bool) -> bool
fn set_nonblocking(&mut self, _on: bool) -> bool
Best-effort non-blocking toggle for the polling deadline
adapter. Returns false when unsupported.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".