@@ -38,8 +38,8 @@ fn main() {
38
38
let srv = socket. incoming ( ) . for_each ( move |( stream, addr) | {
39
39
println ! ( "New Connection: {}" , addr) ;
40
40
41
- // Create a channel for for our stream, which other sockets will use to
42
- // send us message . Then register our address with the stream to send
41
+ // Create a channel for our stream, which other sockets will use to
42
+ // send us messages . Then register our address with the stream to send
43
43
// data to us.
44
44
let ( tx, rx) = tokio_core:: channel:: channel ( & handle) . unwrap ( ) ;
45
45
connections. borrow_mut ( ) . insert ( addr, tx) ;
@@ -85,7 +85,7 @@ fn main() {
85
85
let conns = connections. borrow_mut ( ) ;
86
86
if let Ok ( msg) = message {
87
87
// For each open connection except the sender, send the
88
- // string via the channel
88
+ // string via the channel.
89
89
let iter = conns. iter ( )
90
90
. filter ( |& ( & k, _) | k != addr)
91
91
. map ( |( _, v) | v) ;
@@ -111,9 +111,9 @@ fn main() {
111
111
( socket_reader, socket_writer)
112
112
} ) ;
113
113
114
- // Now that we've got futures representing each half of the socket, join
115
- // them together and then spawn off the result. Here we use the `select`
116
- // combinator to wait for either half to be done to tear down the other .
114
+ // Now that we've got futures representing each half of the socket, we
115
+ // use the `select` combinator to wait for either half to be done to
116
+ // tear down the other. Then we spawn off the result .
117
117
let connections = connections. clone ( ) ;
118
118
let addr = addr;
119
119
handle. spawn ( pair. and_then ( |( reader, writer) | {
0 commit comments