rust/hedgewars-server/src/handlers/checker.rs
author unC0Rr
Wed, 11 May 2022 13:48:55 +0200
changeset 15848 3d05bada4799
parent 15831 7d0f747afcb8
child 15882 f185e7367dd3
permissions -rw-r--r--
Implement appropriate routing of checker messages
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15120
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 15075
diff changeset
     1
use log::*;
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 15075
diff changeset
     2
15804
747278149393 Extract network protocol into a separate crate
unc0rr
parents: 15120
diff changeset
     3
use crate::core::{server::HwServer, types::ClientId};
747278149393 Extract network protocol into a separate crate
unc0rr
parents: 15120
diff changeset
     4
use hedgewars_network_protocol::messages::HwProtocolMessage;
15120
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 15075
diff changeset
     5
15848
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
     6
pub fn handle(
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
     7
    _server: &mut HwServer,
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
     8
    _client_id: ClientId,
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
     9
    _response: &mut super::Response,
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
    10
    message: HwProtocolMessage,
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
    11
) {
15120
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 15075
diff changeset
    12
    match message {
15848
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
    13
        HwProtocolMessage::CheckerReady => {
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
    14
            warn!("Unimplemented")
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
    15
        }
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
    16
        HwProtocolMessage::CheckedOk(info) => {
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
    17
            warn!("Unimplemented")
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
    18
        }
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
    19
        HwProtocolMessage::CheckedFail(message) => {
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
    20
            warn!("Unimplemented")
3d05bada4799 Implement appropriate routing of checker messages
unC0Rr
parents: 15831
diff changeset
    21
        }
15120
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 15075
diff changeset
    22
        _ => warn!("Unknown command"),
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 15075
diff changeset
    23
    }
febccab419b1 Apply dos2unix to rust sources
unc0rr
parents: 15075
diff changeset
    24
}