summaryrefslogtreecommitdiffstats
path: root/examples/chat.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-02-05 17:06:57 -0800
committerAlex Crichton <alex@alexcrichton.com>2017-03-15 09:46:54 -0700
commit89fcc96dd44bff0ba85432d96a3a8f5b20adc94e (patch)
treefe257e453157874d6584b84b270ae462b9b88e20 /examples/chat.rs
parent8fecf98aef1bb2f4f37303c44b2a51126b9c54ff (diff)
Migrate to using tokio-io
Deprecate the existing `io` module in this crate entirely. More details coming soon! Closes #61
Diffstat (limited to 'examples/chat.rs')
-rw-r--r--examples/chat.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/chat.rs b/examples/chat.rs
index e7b472dd..267e0aa6 100644
--- a/examples/chat.rs
+++ b/examples/chat.rs
@@ -17,8 +17,9 @@
//! connected clients they'll all join the same room and see everyone else's
//! messages.
-extern crate tokio_core;
extern crate futures;
+extern crate tokio_core;
+extern crate tokio_io;
use std::collections::HashMap;
use std::rc::Rc;
@@ -27,12 +28,12 @@ use std::iter;
use std::env;
use std::io::{Error, ErrorKind, BufReader};
+use futures::Future;
+use futures::stream::{self, Stream};
use tokio_core::net::TcpListener;
use tokio_core::reactor::Core;
-use tokio_core::io::{self, Io};
-
-use futures::stream::{self, Stream};
-use futures::Future;
+use tokio_io::io;
+use tokio_io::AsyncRead;
fn main() {
let addr = env::args().nth(1).unwrap_or("127.0.0.1:8080".to_string());