mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-22 00:00:11 +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
+1
-1
@@ -33,7 +33,7 @@ fn main() {
|
||||
println!("Listening for connections on {}", addr);
|
||||
|
||||
let clients = listener.incoming();
|
||||
let welcomes = clients.and_then(|(socket, _peer_addr)| {
|
||||
let welcomes = clients.and_then(|socket| {
|
||||
tokio_io::io::write_all(socket, b"Hello!\n")
|
||||
});
|
||||
let server = welcomes.for_each(|(_socket, _welcome)| {
|
||||
|
||||
Reference in New Issue
Block a user