diff --git a/src/common/client.rs b/src/common/client.rs index 727fdc9..3369f0e 100644 --- a/src/common/client.rs +++ b/src/common/client.rs @@ -19,10 +19,10 @@ pub struct Client
{
}
impl {
- pub fn new(socket: net::TcpStream, state: Box {
+ pub fn new(socket: mio::tcp::TcpStream, state: Box {
let mut client = Client {
running: true,
- socket: mio::tcp::TcpStream::from_stream(socket).expect("could not convert socket to nonblocking"),
+ socket: socket,
cipher_in: Box::new(NullCipher {}),
cipher_out: Box::new(NullCipher {}),
state: state,
@@ -62,7 +62,6 @@ impl {
// TODO: this may need to pad to 8 bytes for bb cipher
fn send(&mut self, pkt: &dyn PSOPacket) {
let buf = pkt.as_bytes();
- println!("[send]: {:X?}", buf);
let mut cbuf = self.cipher_out.encrypt(&buf).unwrap();
self.send_buffer.append(&mut cbuf);
self.send_data();
@@ -97,7 +96,6 @@ impl {
}
},
Err(err) => {
- println!("error recv-ing packet with {:?}: {:?}", self.socket, err);
match err {
PacketNetworkError::ClientDisconnected => self.running = false,
_ => println!("error recv-ing packet with {:?}: {:?}", self.socket, err),