equal
deleted
inserted
replaced
10 |
10 |
11 mod loggingin; |
11 mod loggingin; |
12 mod lobby; |
12 mod lobby; |
13 mod inroom; |
13 mod inroom; |
14 |
14 |
15 pub fn handle(server: &mut HWServer, token: mio::Token, poll: &mio::Poll, message: HWProtocolMessage) { |
15 pub fn handle(server: &mut HWServer, token: usize, poll: &mio::Poll, message: HWProtocolMessage) { |
16 match message { |
16 match message { |
17 HWProtocolMessage::Ping => |
17 HWProtocolMessage::Ping => |
18 server.react(token, poll, vec![SendMe(Pong.to_raw_protocol())]), |
18 server.react(token, poll, vec![SendMe(Pong.to_raw_protocol())]), |
19 HWProtocolMessage::Quit(Some(msg)) => |
19 HWProtocolMessage::Quit(Some(msg)) => |
20 server.react(token, poll, vec![ByeClient("User quit: ".to_string() + &msg)]), |
20 server.react(token, poll, vec![ByeClient("User quit: ".to_string() + &msg)]), |