Expand description
Deadline-bounded reads and writes over a TcpStream, implemented
with non-blocking polling instead of SO_RCVTIMEO.
Why not std::net::TcpStream::set_read_timeout: inside the MRI
Ruby process on x86_64-pc-windows-gnu, the first recv on a
socket that carries a receive timeout fails WSAENOTSOCK (os
error 10038) — every other winsock operation (bind, connect,
write, the setsockopt itself, reads WITHOUT the option) succeeds,
and the same code passes in a plain Rust process. Root-caused
empirically across five probe rounds on the gem’s Windows CI (see
the audit ledger; gem PRs #97-#101). Polling sidesteps the option
entirely while keeping the deadlines that prevent the
hang-forever failure class.
Structs§
- Deadline
Stream - A deadline-bounded view over a connected
TcpStream.