Rename to tokio-core, add in futures-io

Renames the futures-mio crate to tokio-core, pulls in the futures-io crate under
an `io` module, and gets everything compiling.
This commit is contained in:
Alex Crichton
2016-08-26 14:39:47 -07:00
parent e71d509fee
commit f107c8d860
29 changed files with 1495 additions and 77 deletions
+3 -4
View File
@@ -1,6 +1,5 @@
extern crate futures;
extern crate futures_io;
extern crate futures_mio;
extern crate tokio_core;
extern crate env_logger;
use std::net::TcpStream;
@@ -9,7 +8,7 @@ use std::io::{Read, Write, BufReader, BufWriter};
use futures::Future;
use futures::stream::Stream;
use futures_io::copy;
use tokio_core::io::copy;
macro_rules! t {
($e:expr) => (match $e {
@@ -23,7 +22,7 @@ fn echo_server() {
const N: usize = 1024;
drop(env_logger::init());
let mut l = t!(futures_mio::Loop::new());
let mut l = t!(tokio_core::Loop::new());
let srv = l.handle().tcp_listen(&"127.0.0.1:0".parse().unwrap());
let srv = t!(l.run(srv));
let addr = t!(srv.local_addr());