mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-18 00:00:09 +02:00
Change net::Incoming signature to match std. (#89)
std's `Incoming` iterator yields `TcpStream` instances. This patch updates the `Incoming` future to match this signature. This changes the yielded value from `(TcpStream, SocketAddr)` -> `TcpStream`.
This commit is contained in:
committed by
Alex Crichton
parent
f4ec9a6360
commit
ae627db266
@@ -56,7 +56,7 @@ fn main() {
|
||||
// shipped round-robin to a particular thread which will associate the
|
||||
// socket with the corresponding event loop and process the connection.
|
||||
let mut next = 0;
|
||||
let srv = listener.incoming().for_each(|(socket, _)| {
|
||||
let srv = listener.incoming().for_each(|socket| {
|
||||
channels[next].unbounded_send(socket).expect("worker thread died");
|
||||
next = (next + 1) % channels.len();
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user