--- a/gameServer2/src/server/client.rs Fri Jan 27 23:03:31 2017 +0300
+++ b/gameServer2/src/server/client.rs Sat Feb 04 19:52:38 2017 +0300
@@ -19,6 +19,9 @@
pub room_id: Option<Token>,
pub nick: String,
pub protocol_number: u32,
+ pub is_master: bool,
+ pub is_ready: bool,
+ pub is_joined_mid_game: bool,
}
impl HWClient {
@@ -32,6 +35,9 @@
nick: String::new(),
protocol_number: 0,
+ is_master: false,
+ is_ready: false,
+ is_joined_mid_game: false,
}
}
@@ -44,7 +50,8 @@
}
pub fn deregister(&mut self, poll: &Poll) {
- poll.deregister(&self.sock);
+ poll.deregister(&self.sock)
+ .ok().expect("could not deregister socket");
}
pub fn send_raw_msg(&mut self, msg: &[u8]) {