master
rasul 5 years ago
parent cb703cf988
commit 96f623584a

@ -38,12 +38,11 @@ impl Game {
let poll = try_log!(Poll::new(), "Unable to create Poll"); let poll = try_log!(Poll::new(), "Unable to create Poll");
try_log!( try_log!(
poll.registry().register(&mut server.socket, Token(0), Interest::READABLE), poll.registry()
.register(&mut server.socket, Token(0), Interest::READABLE),
"Unable to register poll" "Unable to register poll"
); );
debug!("Accepting connections"); debug!("Accepting connections");
Ok(Self { Ok(Self {

@ -3,9 +3,9 @@
use std::io; use std::io;
use std::net::SocketAddr; use std::net::SocketAddr;
use mio::{Interest, Registry, Token};
use mio::event::Source; use mio::event::Source;
use mio::net::TcpListener; use mio::net::TcpListener;
use mio::{Interest, Registry, Token};
use crate::client::Client; use crate::client::Client;
use crate::result::*; use crate::result::*;
@ -60,7 +60,7 @@ impl Source for Server {
&mut self, &mut self,
registry: &Registry, registry: &Registry,
token: Token, token: Token,
interest: Interest interest: Interest,
) -> io::Result<()> { ) -> io::Result<()> {
self.socket.register(registry, token, interest) self.socket.register(registry, token, interest)
} }

Loading…
Cancel
Save