diff --git a/src/main.rs b/src/main.rs index 77899df..6b29e84 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,6 @@ mod client; mod config; mod control; -mod handler; mod proto; mod room; mod user; @@ -24,7 +23,7 @@ use std::thread; use mio::EventLoop; use client::Client; -use handler::ConnectionHandler; +use proto::ConnectionHandler; fn main() { match env_logger::init() { diff --git a/src/handler.rs b/src/proto/handler.rs similarity index 98% rename from src/handler.rs rename to src/proto/handler.rs index 3a96a33..1d34045 100644 --- a/src/handler.rs +++ b/src/proto/handler.rs @@ -6,8 +6,8 @@ use std::sync::mpsc::Sender; use mio::{EventLoop, EventSet, Handler, PollOpt, Token}; use mio::tcp::TcpStream; -use proto::{Packet, PacketStream, Request, Response}; -use proto::server::*; +use super::{Packet, PacketStream, Request, Response}; +use super::server::*; struct TokenCounter { counter: usize, diff --git a/src/proto/mod.rs b/src/proto/mod.rs index e3f3539..4a4d8a3 100644 --- a/src/proto/mod.rs +++ b/src/proto/mod.rs @@ -1,6 +1,9 @@ +mod handler; mod packet; pub mod server; +pub use self::handler::ConnectionHandler; + pub use self::packet::{ Packet, PacketReadError,