gameServer2/src/server/handlers/inroom.rs
author alfadur
Thu, 08 Mar 2018 15:01:18 -0500
changeset 13124 1e39b8749072
parent 12858 a9d105dc5c95
child 13421 cdf69667593b
permissions -rw-r--r--
separated the server logic from all the async io mess.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12152
03ccb89820f3 Room creation halfplemented
unc0rr
parents:
diff changeset
     1
use mio;
03ccb89820f3 Room creation halfplemented
unc0rr
parents:
diff changeset
     2
03ccb89820f3 Room creation halfplemented
unc0rr
parents:
diff changeset
     3
use server::server::HWServer;
03ccb89820f3 Room creation halfplemented
unc0rr
parents:
diff changeset
     4
use server::actions::Action;
03ccb89820f3 Room creation halfplemented
unc0rr
parents:
diff changeset
     5
use server::actions::Action::*;
03ccb89820f3 Room creation halfplemented
unc0rr
parents:
diff changeset
     6
use protocol::messages::HWProtocolMessage;
03ccb89820f3 Room creation halfplemented
unc0rr
parents:
diff changeset
     7
use protocol::messages::HWServerMessage::*;
03ccb89820f3 Room creation halfplemented
unc0rr
parents:
diff changeset
     8
13124
1e39b8749072 separated the server logic from all the async io mess.
alfadur
parents: 12858
diff changeset
     9
pub fn handle(server: &mut HWServer, token: usize, message: HWProtocolMessage) {
12152
03ccb89820f3 Room creation halfplemented
unc0rr
parents:
diff changeset
    10
    match message {
03ccb89820f3 Room creation halfplemented
unc0rr
parents:
diff changeset
    11
        _ => warn!("Unimplemented!"),
03ccb89820f3 Room creation halfplemented
unc0rr
parents:
diff changeset
    12
    }
03ccb89820f3 Room creation halfplemented
unc0rr
parents:
diff changeset
    13
}