Rust echo server and client using futures blocks itself forever
问题 I used this code for the server, and modified this tutorial for the client code. When a client connects to the server, it blocks itself forever. Server: extern crate futures; extern crate futures_io; extern crate futures_mio; use std::net::SocketAddr; use futures::Future; use futures_io::{copy, TaskIo}; use futures::stream::Stream; fn main() { let addr = "127.0.0.1:8080".parse::<SocketAddr>().unwrap(); let mut l = futures_mio::Loop::new().unwrap(); let server = l.handle().tcp_listen(&addr);