summaryrefslogtreecommitdiffstats
path: root/tokio/tests/tcp_split.rs
AgeCommit message (Collapse)Author
2020-05-30chore: fix clippy errors (#2571)Mikail Bagishov
2020-01-22net: add `ReadHalf::{poll,poll_peak}` (#2151)Kevin Leimkuhler
The `&mut self` requirements for `TcpStream` methods ensure that there are at most two tasks using the stream--one for reading and one for writing. `TcpStream::split` allows two separate tasks to hold a reference to a single `TcpStream`. `TcpStream::{peek,poll_peek}` only poll for read readiness, and therefore are safe to use with a `ReadHalf`. Instead of duplicating `TcpStream::poll_peek`, a private method is now used by both `poll_peek` methods that uses the fact that only a `&TcpStream` is required. Closes #2136
2019-10-25net: move into tokio crate (#1683)Carl Lerche
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The `net` implementation is now provided by the main `tokio` crate. Functionality can be opted out of by using the various net related feature flags.