From 7664771cf5f4bc4daa86f3dee0cd39092edfb3fb Mon Sep 17 00:00:00 2001 From: jake Date: Mon, 4 Nov 2019 20:22:23 -0800 Subject: [PATCH] remove some debug statements --- src/common/client.rs | 6 +++--- src/common/clientpool.rs | 1 - src/common/mainloop.rs | 4 ---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/common/client.rs b/src/common/client.rs index 7ce5894..0f28e01 100644 --- a/src/common/client.rs +++ b/src/common/client.rs @@ -95,7 +95,7 @@ impl Client where let pkt_data = self.incoming_data.drain(..pkt_len).collect::>(); - println!("[recv: buf] {:?}", pkt_data); + //println!("[recv: buf] {:?}", pkt_data); let pkt = R::from_bytes(&pkt_data[..pkt_size]) .map_err(|err| -> PacketNetworkError { err.into() })?; @@ -108,12 +108,12 @@ impl Client where pub fn send_pkt(&mut self, pkt: S) { println!("[send] {:?}", pkt); let buf = pkt.as_bytes(); - if buf.len() < 1024*2 { + /*if buf.len() < 1024*2 { println!("[send: buf] {:?}", buf); } else { println!("[send: buf] [...large buffer...]"); - } + }*/ let mut cbuf = self.cipher_out.encrypt(&buf).unwrap(); self.send_buffer.append(&mut cbuf); self.send_data(); diff --git a/src/common/clientpool.rs b/src/common/clientpool.rs index d9541ec..0ef60ca 100644 --- a/src/common/clientpool.rs +++ b/src/common/clientpool.rs @@ -103,7 +103,6 @@ impl ClientPool where Ok(action) => { match action { ClientAction::EncryptionKeys(client_id, cipher_in, cipher_out) => { - println!("enc {:?}", client_id); self.clients.get_mut(&client_id) .map(|client| { client.set_cipher(cipher_in, cipher_out); diff --git a/src/common/mainloop.rs b/src/common/mainloop.rs index 2b45ebc..a2a0991 100644 --- a/src/common/mainloop.rs +++ b/src/common/mainloop.rs @@ -5,10 +5,6 @@ use mio_extras::channel::{channel, Sender, Receiver}; use crate::common::clientpool::{ClientPool, ClientAction, ClientPoolAction}; use crate::common::serverstate::{RecvServerPacket, SendServerPacket, ServerState, OnConnect}; - - - - fn recv_from_clientpool(state: &mut STATE, pool_recv: &Receiver>, pool_send: &Sender>) where