gameServer2/src/server/handlers/mod.rs
changeset 13666 09f4a30e50cc
parent 13492 ba5211dddb21
child 13771 4664da990556
equal deleted inserted replaced
13665:5664650befcd 13666:09f4a30e50cc
     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()]),