summaryrefslogtreecommitdiffstats
path: root/examples/echo.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-12-05 09:02:07 -0800
committerAlex Crichton <alex@alexcrichton.com>2017-12-05 09:02:07 -0800
commit108e1a2c1a66a6f0123704e42624b51e9536476f (patch)
tree627489b7aa04cd2da9cdfdf53172e235fc7a6827 /examples/echo.rs
parent46062794aaedf1d2f8385124fa5b7061317a2527 (diff)
Blanket rename `Core` to `Reactor`
This commit uses a script to rename `Core` to `Reactor` all at once, notably: find . -name '*.rs' | xargs sed -i 's/\bCore\b/Reactor/g'
Diffstat (limited to 'examples/echo.rs')
-rw-r--r--examples/echo.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/echo.rs b/examples/echo.rs
index fdf0e4cf..07c061c4 100644
--- a/examples/echo.rs
+++ b/examples/echo.rs
@@ -32,7 +32,7 @@ use futures_cpupool::CpuPool;
use tokio_io::AsyncRead;
use tokio_io::io::copy;
use tokio::net::TcpListener;
-use tokio::reactor::Core;
+use tokio::reactor::Reactor;
fn main() {
// Allow passing an address to listen on as the first argument of this
@@ -42,15 +42,15 @@ fn main() {
let addr = addr.parse::<SocketAddr>().unwrap();
// First up we'll create the event loop that's going to drive this server.
- // This is done by creating an instance of the `Core` type, tokio-core's
+ // This is done by creating an instance of the `Reactor` type, tokio-core's
// event loop. Most functions in tokio-core return an `io::Result`, and
- // `Core::new` is no exception. For this example, though, we're mostly just
+ // `Reactor::new` is no exception. For this example, though, we're mostly just
// ignoring errors, so we unwrap the return value.
//
// After the event loop is created we acquire a handle to it through the
// `handle` method. With this handle we'll then later be able to create I/O
// objects.
- let mut core = Core::new().unwrap();
+ let mut core = Reactor::new().unwrap();
let handle = core.handle();
// Next up we create a TCP listener which will listen for incoming
@@ -126,7 +126,7 @@ fn main() {
});
// And finally now that we've define what our server is, we run it! We
- // didn't actually do much I/O up to this point and this `Core::run` method
+ // didn't actually do much I/O up to this point and this `Reactor::run` method
// is responsible for driving the entire server to completion.
//
// The `run` method will return the result of the future that it's running,