mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
Move binaries to examples
This commit is contained in:
parent
6c6fb917ee
commit
02538d035f
@ -1,5 +1,6 @@
|
||||
//! An echo server that just writes back everything that's written to it.
|
||||
|
||||
extern crate env_logger;
|
||||
extern crate futures;
|
||||
extern crate tokio_core;
|
||||
|
||||
@ -12,6 +13,7 @@ use tokio_core::Loop;
|
||||
use tokio_core::io::{copy, TaskIo};
|
||||
|
||||
fn main() {
|
||||
env_logger::init().unwrap();
|
||||
let addr = env::args().nth(1).unwrap_or("127.0.0.1:8080".to_string());
|
||||
let addr = addr.parse::<SocketAddr>().unwrap();
|
||||
|
@ -3,7 +3,7 @@
|
||||
//! There is no concurrency in this server, only one connection is written to at
|
||||
//! a time.
|
||||
|
||||
#[macro_use]
|
||||
extern crate env_logger;
|
||||
extern crate futures;
|
||||
extern crate tokio_core;
|
||||
|
||||
@ -16,6 +16,7 @@ use futures::stream::{self, Stream};
|
||||
use tokio_core::io::IoFuture;
|
||||
|
||||
fn main() {
|
||||
env_logger::init().unwrap();
|
||||
let addr = env::args().nth(1).unwrap_or("127.0.0.1:8080".to_string());
|
||||
let addr = addr.parse::<SocketAddr>().unwrap();
|
||||
|
Loading…
x
Reference in New Issue
Block a user