The timeout for a `UnixStream` will interrupt a `read` even when more data is available. The preference would be that the timeout applies to each read, where the timeout is reset again once a read is successful. This better supports streaming semantics expected for the `Handle::subscribe` method. To achieve this, the `LineIter` type holds the `UnixStream` and timeout `Duration`. The `Iterator` implementation can then use `read_line` to progress the stream one line at a time, and the timeout only applies to each read. Co-authored-by: Alexis Sellier <alexis@radicle.xyz> Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett |
||
|---|---|---|
| .. | ||
| examples | ||
| src | ||
| tests | ||
| Cargo.toml | ||
| build.rs | ||