mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-28 00:00:11 +02:00
Rename crate to tokio
This commit is contained in:
committed by
Alex Crichton
parent
25f30c91c4
commit
36aaaa1520
+4
-4
@@ -4,7 +4,7 @@
|
||||
extern crate test;
|
||||
extern crate futures;
|
||||
#[macro_use]
|
||||
extern crate tokio_core;
|
||||
extern crate tokio;
|
||||
|
||||
use std::io;
|
||||
use std::net::SocketAddr;
|
||||
@@ -14,8 +14,8 @@ use futures::sync::oneshot;
|
||||
use futures::sync::mpsc;
|
||||
use futures::{Future, Poll, Sink, Stream};
|
||||
use test::Bencher;
|
||||
use tokio_core::net::UdpSocket;
|
||||
use tokio_core::reactor::Core;
|
||||
use tokio::net::UdpSocket;
|
||||
use tokio::reactor::Core;
|
||||
|
||||
/// UDP echo server
|
||||
struct EchoServer {
|
||||
@@ -61,7 +61,7 @@ fn udp_echo_latency(b: &mut Bencher) {
|
||||
let mut l = Core::new().unwrap();
|
||||
let handle = l.handle();
|
||||
|
||||
let socket = tokio_core::net::UdpSocket::bind(&any_addr, &handle).unwrap();
|
||||
let socket = tokio::net::UdpSocket::bind(&any_addr, &handle).unwrap();
|
||||
tx.complete(socket.local_addr().unwrap());
|
||||
|
||||
let server = EchoServer::new(socket);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
#![feature(test)]
|
||||
|
||||
extern crate futures;
|
||||
extern crate tokio_core;
|
||||
extern crate tokio;
|
||||
|
||||
#[macro_use]
|
||||
extern crate tokio_io;
|
||||
@@ -10,8 +10,8 @@ pub extern crate test;
|
||||
|
||||
mod prelude {
|
||||
pub use futures::*;
|
||||
pub use tokio_core::reactor::Core;
|
||||
pub use tokio_core::net::{TcpListener, TcpStream};
|
||||
pub use tokio::reactor::Core;
|
||||
pub use tokio::net::{TcpListener, TcpStream};
|
||||
pub use tokio_io::io::read_to_end;
|
||||
|
||||
pub use test::{self, Bencher};
|
||||
|
||||
Reference in New Issue
Block a user