mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-23 00:00:10 +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
+3
-1
@@ -49,7 +49,9 @@ fn main() {
|
||||
// Once the same thread executor lands, transition to single threaded.
|
||||
let connections = Arc::new(Mutex::new(HashMap::new()));
|
||||
|
||||
let srv = socket.incoming().for_each(move |(stream, addr)| {
|
||||
let srv = socket.incoming().for_each(move |stream| {
|
||||
let addr = stream.peer_addr().unwrap();
|
||||
|
||||
println!("New Connection: {}", addr);
|
||||
let (reader, writer) = stream.split();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user