gameServer2/src/server/server.rs
changeset 12137 193dfdcb0620
parent 12136 e25a82ce2374
child 12138 e0bf51609062
--- a/gameServer2/src/server/server.rs	Sat Jan 14 00:46:52 2017 +0300
+++ b/gameServer2/src/server/server.rs	Sat Jan 14 22:30:09 2017 +0300
@@ -31,7 +31,7 @@
 
     pub fn accept(&mut self, poll: &Poll) -> io::Result<()> {
         let (sock, addr) = self.listener.accept()?;
-        println!("Connected: {}", addr);
+        info!("Connected: {}", addr);
 
         let client = HWClient::new(sock);
         let token = self.clients.insert(client)
@@ -51,6 +51,11 @@
                            token: Token) -> io::Result<()> {
         self.clients[token].writable(poll)
     }
+
+    pub fn client_error(&mut self, poll: &Poll,
+                           token: Token) -> io::Result<()> {
+        self.clients[token].error(poll)
+    }
 }