diff options
author | Alex Crichton <alex@alexcrichton.com> | 2016-11-22 12:35:30 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2016-11-22 12:35:30 -0800 |
commit | 1a48b79474402435f371c31f3121f9ec6cd9aab7 (patch) | |
tree | 16f5a62a38808277f9564d049e95730eee7a9d7e /examples/chat.rs | |
parent | 9b62ade9629a44a792ba0243af52613d7283cec0 (diff) |
Touch up examples to ensure consistency
Diffstat (limited to 'examples/chat.rs')
-rw-r--r-- | examples/chat.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/examples/chat.rs b/examples/chat.rs index 4a9862de..e7b472dd 100644 --- a/examples/chat.rs +++ b/examples/chat.rs @@ -3,6 +3,19 @@ //! This is a simple line-based server which accepts connections, reads lines //! from those connections, and broadcasts the lines to all other connected //! clients. In a sense this is a bit of a "poor man's chat server". +//! +//! You can test this out by running: +//! +//! cargo run --example chat +//! +//! And then in another window run: +//! +//! nc -4 localhost 8080 +//! +//! You can run the second command in multiple windows and then chat between the +//! two, seeing the messages from the other client as they're received. For all +//! connected clients they'll all join the same room and see everyone else's +//! messages. extern crate tokio_core; extern crate futures; @@ -118,4 +131,3 @@ fn main() { // execute server core.run(srv).unwrap(); } - |