diff options
Diffstat (limited to 'karld/src/main.rs')
-rw-r--r-- | karld/src/main.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/karld/src/main.rs b/karld/src/main.rs index 7fa47e2..f70b7e7 100644 --- a/karld/src/main.rs +++ b/karld/src/main.rs @@ -1,11 +1,11 @@ pub mod condition; pub mod interface; -use std::{collections::HashMap, sync::RwLock}; use crossbeam_channel::Sender; use interface::network_loop; -use karlcommon::{Task, Condition, Property, ServerboundPacket, ClientboundPacket}; -use log::info; +use karlcommon::{ClientboundPacket, Condition, Property, ServerboundPacket, Task}; +use log::{debug, info}; +use std::{collections::HashMap, sync::RwLock}; fn main() { env_logger::init(); @@ -43,7 +43,6 @@ lazy_static::lazy_static! { } pub fn handle_packet(client: u32, packet: ServerboundPacket, responder: Sender<ClientboundPacket>) { - println!("{:?}, {:?}, {:?}", client, packet, responder); match packet { ServerboundPacket::Download => { let _ = responder.send(ClientboundPacket::DownloadResponse( @@ -56,5 +55,8 @@ pub fn handle_packet(client: u32, packet: ServerboundPacket, responder: Sender<C ServerboundPacket::RemoveTask(i) => { TASKS.write().unwrap().remove(&i); } + ServerboundPacket::Handshake { version } => { + debug!("{client}: version {version}"); + } } } |