equal
deleted
inserted
replaced
4 use super::{ |
4 use super::{ |
5 server::HWServer, |
5 server::HWServer, |
6 actions::{Action, Action::*}, |
6 actions::{Action, Action::*}, |
7 coretypes::ClientId |
7 coretypes::ClientId |
8 }; |
8 }; |
9 use protocol::messages::{ |
9 use crate::{ |
10 HWProtocolMessage, |
10 protocol::messages::{ |
11 HWServerMessage::* |
11 HWProtocolMessage, |
|
12 HWServerMessage::* |
|
13 } |
12 }; |
14 }; |
13 mod common; |
15 |
14 mod loggingin; |
16 mod loggingin; |
15 mod lobby; |
17 mod lobby; |
16 mod inroom; |
18 mod inroom; |
|
19 mod common; |
17 |
20 |
18 pub fn handle(server: &mut HWServer, client_id: ClientId, message: HWProtocolMessage) { |
21 pub fn handle(server: &mut HWServer, client_id: ClientId, message: HWProtocolMessage) { |
19 match message { |
22 match message { |
20 HWProtocolMessage::Ping => |
23 HWProtocolMessage::Ping => |
21 server.react(client_id, vec![Pong.send_self().action()]), |
24 server.react(client_id, vec![Pong.send_self().action()]), |