summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml14
-rw-r--r--README.md2
-rw-r--r--benches/latency.rs8
-rw-r--r--benches/tcp.rs6
-rw-r--r--examples/README.md4
-rw-r--r--examples/chat.rs6
-rw-r--r--examples/compress.rs6
-rw-r--r--examples/connect.rs12
-rw-r--r--examples/echo-threads.rs8
-rw-r--r--examples/echo-udp.rs6
-rw-r--r--examples/echo.rs6
-rw-r--r--examples/hello.rs6
-rw-r--r--examples/proxy.rs6
-rw-r--r--examples/sink.rs6
-rw-r--r--examples/tinydb.rs6
-rw-r--r--examples/tinyhttp.rs6
-rw-r--r--examples/udp-codec.rs6
-rw-r--r--src/lib.rs6
-rw-r--r--tests/buffered.rs6
-rw-r--r--tests/chain.rs6
-rw-r--r--tests/echo.rs6
-rw-r--r--tests/interval.rs4
-rw-r--r--tests/limit.rs6
-rw-r--r--tests/line-frames.rs6
-rw-r--r--tests/pipe-hup.rs4
-rw-r--r--tests/spawn.rs4
-rw-r--r--tests/stream-buffered.rs6
-rw-r--r--tests/tcp.rs6
-rw-r--r--tests/timeout.rs4
-rw-r--r--tests/udp.rs6
30 files changed, 92 insertions, 92 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 7ad75cdc..d4b2f936 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,11 +1,11 @@
[package]
-name = "tokio-core"
-version = "0.1.10"
-authors = ["Alex Crichton <alex@alexcrichton.com>"]
+name = "tokio"
+version = "0.1.0"
+authors = ["Tokio Authors <authors@tokio.rs>"]
license = "MIT/Apache-2.0"
-repository = "https://github.com/tokio-rs/tokio-core"
+repository = "https://github.com/tokio-rs/tokio"
homepage = "https://tokio.rs"
-documentation = "https://docs.rs/tokio-core/0.1"
+documentation = "https://docs.rs/tokio/0.1"
description = """
Core I/O and event loop primitives for asynchronous I/O in Rust. Foundation for
the rest of the tokio crates.
@@ -13,8 +13,8 @@ the rest of the tokio crates.
categories = ["asynchronous"]
[badges]
-travis-ci = { repository = "tokio-rs/tokio-core" }
-appveyor = { repository = "alexcrichton/tokio-core" }
+travis-ci = { repository = "tokio-rs/tokio" }
+appveyor = { repository = "alexcrichton/tokio" }
[dependencies]
bytes = "0.4"
diff --git a/README.md b/README.md
index 0aadf56b..8f982660 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ tokio-core = "0.1"
Next, add this to your crate:
```rust
-extern crate tokio_core;
+extern crate tokio;
```
You can find extensive documentation and examples about how to use this crate
diff --git a/benches/latency.rs b/benches/latency.rs
index 8415b363..7627ecd4 100644
--- a/benches/latency.rs
+++ b/benches/latency.rs
@@ -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);
diff --git a/benches/tcp.rs b/benches/tcp.rs
index a8324a0d..245ed881 100644
--- a/benches/tcp.rs
+++ b/benches/tcp.rs
@@ -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};
diff --git a/examples/README.md b/examples/README.md
index 8215a6c8..688984b9 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -1,7 +1,7 @@
## Examples of `tokio-core`
This directory contains a number of examples showcasing various capabilities of
-the `tokio_core` crate. Most of these examples also leverage the `futures` and
+the `tokio` crate. Most of these examples also leverage the `futures` and
`tokio_io` crates, along with a number of other miscellaneous dependencies for
various tasks.
@@ -15,7 +15,7 @@ A high level description of each example is:
* `hello` - a tiny server that simply writes "Hello!" to all connected clients
and then terminates the connection, should help see how to create and
- initialize `tokio_core`.
+ initialize `tokio`.
* `echo` - this is your standard TCP "echo server" which simply accepts
connections and then echos back any contents that are read from each connected
client.
diff --git a/examples/chat.rs b/examples/chat.rs
index 039fb685..ff364476 100644
--- a/examples/chat.rs
+++ b/examples/chat.rs
@@ -18,7 +18,7 @@
//! messages.
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::collections::HashMap;
@@ -30,8 +30,8 @@ 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::net::TcpListener;
+use tokio::reactor::Core;
use tokio_io::io;
use tokio_io::AsyncRead;
diff --git a/examples/compress.rs b/examples/compress.rs
index 2c73b10a..6b0f1730 100644
--- a/examples/compress.rs
+++ b/examples/compress.rs
@@ -21,7 +21,7 @@
extern crate futures;
extern crate futures_cpupool;
extern crate flate2;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::io;
@@ -30,8 +30,8 @@ use std::net::SocketAddr;
use futures::{Future, Stream, Poll};
use futures_cpupool::CpuPool;
-use tokio_core::net::{TcpListener, TcpStream};
-use tokio_core::reactor::Core;
+use tokio::net::{TcpListener, TcpStream};
+use tokio::reactor::Core;
use tokio_io::{AsyncRead, AsyncWrite};
use flate2::write::GzEncoder;
diff --git a/examples/connect.rs b/examples/connect.rs
index 4d8e0c7f..d5238a53 100644
--- a/examples/connect.rs
+++ b/examples/connect.rs
@@ -15,7 +15,7 @@
//! stdin/stdout to a server" to get up and running.
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
extern crate bytes;
@@ -26,7 +26,7 @@ use std::thread;
use futures::sync::mpsc;
use futures::{Sink, Future, Stream};
-use tokio_core::reactor::Core;
+use tokio::reactor::Core;
fn main() {
// Determine if we're going to run in TCP or UDP mode
@@ -83,8 +83,8 @@ mod tcp {
use bytes::{BufMut, BytesMut};
use futures::{Future, Stream};
- use tokio_core::net::TcpStream;
- use tokio_core::reactor::Handle;
+ use tokio::net::TcpStream;
+ use tokio::reactor::Handle;
use tokio_io::AsyncRead;
use tokio_io::codec::{Encoder, Decoder};
@@ -167,8 +167,8 @@ mod udp {
use bytes::BytesMut;
use futures::{Future, Stream};
- use tokio_core::net::{UdpCodec, UdpSocket};
- use tokio_core::reactor::Handle;
+ use tokio::net::{UdpCodec, UdpSocket};
+ use tokio::reactor::Handle;
pub fn connect(&addr: &SocketAddr,
handle: &Handle,
diff --git a/examples/echo-threads.rs b/examples/echo-threads.rs
index 810fd048..63ed47e4 100644
--- a/examples/echo-threads.rs
+++ b/examples/echo-threads.rs
@@ -15,7 +15,7 @@
extern crate futures;
extern crate num_cpus;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::env;
@@ -27,8 +27,8 @@ use futures::stream::Stream;
use futures::sync::mpsc;
use tokio_io::AsyncRead;
use tokio_io::io::copy;
-use tokio_core::net::TcpStream;
-use tokio_core::reactor::Core;
+use tokio::net::TcpStream;
+use tokio::reactor::Core;
fn main() {
// First argument, the address to bind
@@ -72,7 +72,7 @@ fn worker(rx: mpsc::UnboundedReceiver<net::TcpStream>) {
let done = rx.for_each(move |socket| {
// First up when we receive a socket we associate it with our event loop
// using the `TcpStream::from_stream` API. After that the socket is not
- // a `tokio_core::net::TcpStream` meaning it's in nonblocking mode and
+ // a `tokio::net::TcpStream` meaning it's in nonblocking mode and
// ready to be used with Tokio
let socket = TcpStream::from_stream(socket, &handle)
.expect("failed to associate TCP stream");
diff --git a/examples/echo-udp.rs b/examples/echo-udp.rs
index f555e609..58c0afd2 100644
--- a/examples/echo-udp.rs
+++ b/examples/echo-udp.rs
@@ -12,14 +12,14 @@
extern crate futures;
#[macro_use]
-extern crate tokio_core;
+extern crate tokio;
use std::{env, io};
use std::net::SocketAddr;
use futures::{Future, Poll};
-use tokio_core::net::UdpSocket;
-use tokio_core::reactor::Core;
+use tokio::net::UdpSocket;
+use tokio::reactor::Core;
struct Server {
socket: UdpSocket,
diff --git a/examples/echo.rs b/examples/echo.rs
index 2bf8f391..9abd9c38 100644
--- a/examples/echo.rs
+++ b/examples/echo.rs
@@ -18,7 +18,7 @@
//! should be able to see them all make progress simultaneously.
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::env;
@@ -28,8 +28,8 @@ use futures::Future;
use futures::stream::Stream;
use tokio_io::AsyncRead;
use tokio_io::io::copy;
-use tokio_core::net::TcpListener;
-use tokio_core::reactor::Core;
+use tokio::net::TcpListener;
+use tokio::reactor::Core;
fn main() {
// Allow passing an address to listen on as the first argument of this
diff --git a/examples/hello.rs b/examples/hello.rs
index 0d7a0ebc..ddbb0e45 100644
--- a/examples/hello.rs
+++ b/examples/hello.rs
@@ -13,15 +13,15 @@
extern crate env_logger;
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::env;
use std::net::SocketAddr;
use futures::stream::Stream;
-use tokio_core::reactor::Core;
-use tokio_core::net::TcpListener;
+use tokio::reactor::Core;
+use tokio::net::TcpListener;
fn main() {
env_logger::init().unwrap();
diff --git a/examples/proxy.rs b/examples/proxy.rs
index 7bc53819..05e4c0c3 100644
--- a/examples/proxy.rs
+++ b/examples/proxy.rs
@@ -17,7 +17,7 @@
//! the echo server, and you'll be able to see data flowing between them.
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::sync::Arc;
@@ -27,8 +27,8 @@ use std::io::{self, Read, Write};
use futures::stream::Stream;
use futures::{Future, Poll};
-use tokio_core::net::{TcpListener, TcpStream};
-use tokio_core::reactor::Core;
+use tokio::net::{TcpListener, TcpStream};
+use tokio::reactor::Core;
use tokio_io::{AsyncRead, AsyncWrite};
use tokio_io::io::{copy, shutdown};
diff --git a/examples/sink.rs b/examples/sink.rs
index d709178d..5f42443b 100644
--- a/examples/sink.rs
+++ b/examples/sink.rs
@@ -17,7 +17,7 @@
extern crate env_logger;
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::env;
@@ -27,8 +27,8 @@ use std::net::SocketAddr;
use futures::Future;
use futures::stream::{self, Stream};
use tokio_io::IoFuture;
-use tokio_core::net::{TcpListener, TcpStream};
-use tokio_core::reactor::Core;
+use tokio::net::{TcpListener, TcpStream};
+use tokio::reactor::Core;
fn main() {
env_logger::init().unwrap();
diff --git a/examples/tinydb.rs b/examples/tinydb.rs
index fe7865c3..61d0fd62 100644
--- a/examples/tinydb.rs
+++ b/examples/tinydb.rs
@@ -40,7 +40,7 @@
//! returning the previous value, if any.
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::cell::RefCell;
@@ -51,8 +51,8 @@ use std::env;
use std::net::SocketAddr;
use futures::prelude::*;
-use tokio_core::net::TcpListener;
-use tokio_core::reactor::Core;
+use tokio::net::TcpListener;
+use tokio::reactor::Core;
use tokio_io::AsyncRead;
use tokio_io::io::{lines, write_all};
diff --git a/examples/tinyhttp.rs b/examples/tinyhttp.rs
index 2dd109de..043e56d2 100644
--- a/examples/tinyhttp.rs
+++ b/examples/tinyhttp.rs
@@ -20,7 +20,7 @@ extern crate num_cpus;
extern crate serde_derive;
extern crate serde_json;
extern crate time;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::env;
@@ -35,8 +35,8 @@ use futures::sync::mpsc;
use futures::{Stream, Future, Sink};
use http::{Request, Response, StatusCode};
use http::header::HeaderValue;
-use tokio_core::net::TcpStream;
-use tokio_core::reactor::Core;
+use tokio::net::TcpStream;
+use tokio::reactor::Core;
use tokio_io::codec::{Encoder, Decoder};
use tokio_io::{AsyncRead};
diff --git a/examples/udp-codec.rs b/examples/udp-codec.rs
index bd243090..4066060e 100644
--- a/examples/udp-codec.rs
+++ b/examples/udp-codec.rs
@@ -6,7 +6,7 @@
//! new message with a new destination. Overall, we then use this to construct a
//! "ping pong" pair where two sockets are sending messages back and forth.
-extern crate tokio_core;
+extern crate tokio;
extern crate env_logger;
extern crate futures;
@@ -14,8 +14,8 @@ use std::io;
use std::net::SocketAddr;
use futures::{Future, Stream, Sink};
-use tokio_core::net::{UdpSocket, UdpCodec};
-use tokio_core::reactor::Core;
+use tokio::net::{UdpSocket, UdpCodec};
+use tokio::reactor::Core;
pub struct LineCodec;
diff --git a/src/lib.rs b/src/lib.rs
index 23ab424d..52167e06 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -43,14 +43,14 @@
//!
//! ```no_run
//! extern crate futures;
-//! extern crate tokio_core;
+//! extern crate tokio;
//! extern crate tokio_io;
//!
//! use futures::{Future, Stream};
//! use tokio_io::AsyncRead;
//! use tokio_io::io::copy;
-//! use tokio_core::net::TcpListener;
-//! use tokio_core::reactor::Core;
+//! use tokio::net::TcpListener;
+//! use tokio::reactor::Core;
//!
//! fn main() {
//! // Create the event loop that will drive this server
diff --git a/tests/buffered.rs b/tests/buffered.rs
index c2423240..f1680157 100644
--- a/tests/buffered.rs
+++ b/tests/buffered.rs
@@ -1,6 +1,6 @@
extern crate env_logger;
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::net::TcpStream;
@@ -10,8 +10,8 @@ use std::io::{Read, Write, BufReader, BufWriter};
use futures::Future;
use futures::stream::Stream;
use tokio_io::io::copy;
-use tokio_core::net::TcpListener;
-use tokio_core::reactor::Core;
+use tokio::net::TcpListener;
+use tokio::reactor::Core;
macro_rules! t {
($e:expr) => (match $e {
diff --git a/tests/chain.rs b/tests/chain.rs
index fd69e0b9..89621eec 100644
--- a/tests/chain.rs
+++ b/tests/chain.rs
@@ -1,5 +1,5 @@
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::net::TcpStream;
@@ -9,8 +9,8 @@ use std::io::{Write, Read};
use futures::Future;
use futures::stream::Stream;
use tokio_io::io::read_to_end;
-use tokio_core::net::TcpListener;
-use tokio_core::reactor::Core;
+use tokio::net::TcpListener;
+use tokio::reactor::Core;
macro_rules! t {
($e:expr) => (match $e {
diff --git a/tests/echo.rs b/tests/echo.rs
index 7a1bf7ff..f9bde3a1 100644
--- a/tests/echo.rs
+++ b/tests/echo.rs
@@ -1,6 +1,6 @@
extern crate env_logger;
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::io::{Read, Write};
@@ -9,8 +9,8 @@ use std::thread;
use futures::Future;
use futures::stream::Stream;
-use tokio_core::net::TcpListener;
-use tokio_core::reactor::Core;
+use tokio::net::TcpListener;
+use tokio::reactor::Core;
use tokio_io::AsyncRead;
use tokio_io::io::copy;
diff --git a/tests/interval.rs b/tests/interval.rs
index 3d056c36..a1a3197b 100644
--- a/tests/interval.rs
+++ b/tests/interval.rs
@@ -1,11 +1,11 @@
extern crate env_logger;
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
use std::time::{Instant, Duration};
use futures::stream::{Stream};
-use tokio_core::reactor::{Core, Interval};
+use tokio::reactor::{Core, Interval};
macro_rules! t {
($e:expr) => (match $e {
diff --git a/tests/limit.rs b/tests/limit.rs
index 53bbbf7b..452e553f 100644
--- a/tests/limit.rs
+++ b/tests/limit.rs
@@ -1,5 +1,5 @@
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::net::TcpStream;
@@ -9,8 +9,8 @@ use std::io::{Write, Read};
use futures::Future;
use futures::stream::Stream;
use tokio_io::io::read_to_end;
-use tokio_core::net::TcpListener;
-use tokio_core::reactor::Core;
+use tokio::net::TcpListener;
+use tokio::reactor::Core;
macro_rules! t {
($e:expr) => (match $e {
diff --git a/tests/line-frames.rs b/tests/line-frames.rs
index 3270d685..06ea3080 100644
--- a/tests/line-frames.rs
+++ b/tests/line-frames.rs
@@ -1,6 +1,6 @@
extern crate env_logger;
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
extern crate bytes;
@@ -9,8 +9,8 @@ use std::net::Shutdown;
use bytes::{BytesMut, BufMut};
use futures::{Future, Stream, Sink};
-use tokio_core::net::{TcpListener, TcpStream};
-use tokio_core::reactor::Core;
+use tokio::net::{TcpListener, TcpStream};
+use tokio::reactor::Core;
use tokio_io::codec::{Encoder, Decoder};
use tokio_io::io::{write_all, read};
use tokio_io::AsyncRead;
diff --git a/tests/pipe-hup.rs b/tests/pipe-hup.rs
index 8ea1095a..30df27bc 100644
--- a/tests/pipe-hup.rs
+++ b/tests/pipe-hup.rs
@@ -4,7 +4,7 @@ extern crate env_logger;
extern crate futures;
extern crate libc;
extern crate mio;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::fs::File;
@@ -16,7 +16,7 @@ use std::time::Duration;
use mio::unix::{UnixReady, EventedFd};
use mio::{PollOpt, Ready, Token};
use mio::event::Evented;
-use tokio_core::reactor::{Core, PollEvented};
+use tokio::reactor::{Core, PollEvented};
use tokio_io::io::read_to_end;
macro_rules! t {
diff --git a/tests/spawn.rs b/tests/spawn.rs
index 98434a81..93ec07a3 100644
--- a/tests/spawn.rs
+++ b/tests/spawn.rs
@@ -1,4 +1,4 @@
-extern crate tokio_core;
+extern crate tokio;
extern crate env_logger;
extern crate futures;
@@ -10,7 +10,7 @@ use std::time::Duration;
use futures::{Future, Poll};
use futures::future;
use futures::sync::oneshot;
-use tokio_core::reactor::{Core, Timeout};
+use tokio::reactor::{Core, Timeout};
#[test]
fn simple() {
diff --git a/tests/stream-buffered.rs b/tests/stream-buffered.rs
index 012fd054..8ba74ed2 100644
--- a/tests/stream-buffered.rs
+++ b/tests/stream-buffered.rs
@@ -1,6 +1,6 @@
extern crate env_logger;
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
extern crate tokio_io;
use std::io::{Read, Write};
@@ -11,8 +11,8 @@ use futures::Future;
use futures::stream::Stream;
use tokio_io::io::copy;
use tokio_io::AsyncRead;
-use tokio_core::net::TcpListener;
-use tokio_core::reactor::Core;
+use tokio::net::TcpListener;
+use tokio::reactor::Core;
macro_rules! t {
($e:expr) => (match $e {
diff --git a/tests/tcp.rs b/tests/tcp.rs
index 929c5962..9ebbefe3 100644
--- a/tests/tcp.rs
+++ b/tests/tcp.rs
@@ -1,6 +1,6 @@
extern crate env_logger;
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
use std::net;
use std::sync::mpsc::channel;
@@ -8,8 +8,8 @@ use std::thread;
use futures::Future;
use futures::stream::Stream;
-use tokio_core::reactor::Core;
-use tokio_core::net::{TcpListener, TcpStream};
+use tokio::reactor::Core;
+use tokio::net::{TcpListener, TcpStream};
macro_rules! t {
($e:expr) => (match $e {
diff --git a/tests/timeout.rs b/tests/timeout.rs
index c1e22417..a128fe39 100644
--- a/tests/timeout.rs
+++ b/tests/timeout.rs
@@ -1,10 +1,10 @@
extern crate env_logger;
extern crate futures;
-extern crate tokio_core;
+extern crate tokio;
use std::time::{Instant, Duration};
-use tokio_core::reactor::{Core, Timeout};
+use tokio::reactor::{Core, Timeout};
macro_rules! t {
($e:expr) => (match $e {
diff --git a/tests/udp.rs b/tests/udp.rs
index 7c6627a9..8f0c30f3 100644
--- a/tests/udp.rs
+++ b/tests/udp.rs
@@ -1,13 +1,13 @@
extern crate futures;
#[macro_use]
-extern crate tokio_core;
+extern crate tokio;
use std::io;
use std::net::SocketAddr;
use futures::{Future, Poll, Stream, Sink};
-use tokio_core::net::{UdpSocket, UdpCodec};
-use tokio_core::reactor::Core;
+use tokio::net::{UdpSocket, UdpCodec};
+use tokio::reactor::Core;
macro_rules! t {
($e:expr) => (match $e {