summaryrefslogtreecommitdiffstats
path: root/examples/chat.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-11-22 12:35:30 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-11-22 12:35:30 -0800
commit1a48b79474402435f371c31f3121f9ec6cd9aab7 (patch)
tree16f5a62a38808277f9564d049e95730eee7a9d7e /examples/chat.rs
parent9b62ade9629a44a792ba0243af52613d7283cec0 (diff)
Touch up examples to ensure consistency
Diffstat (limited to 'examples/chat.rs')
-rw-r--r--examples/chat.rs14
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();
}
-