mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-28 00:00:11 +02:00
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:
+3
-4
@@ -1,7 +1,6 @@
|
||||
extern crate env_logger;
|
||||
extern crate futures;
|
||||
extern crate futures_io;
|
||||
extern crate futures_mio;
|
||||
extern crate tokio_core;
|
||||
|
||||
use std::io::{Read, Write};
|
||||
use std::net::TcpStream;
|
||||
@@ -9,7 +8,7 @@ use std::thread;
|
||||
|
||||
use futures::Future;
|
||||
use futures::stream::Stream;
|
||||
use futures_io::{copy, TaskIo};
|
||||
use tokio_core::io::{copy, TaskIo};
|
||||
|
||||
macro_rules! t {
|
||||
($e:expr) => (match $e {
|
||||
@@ -22,7 +21,7 @@ macro_rules! t {
|
||||
fn echo_server() {
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user