From 2f811db0a396d584fca15fff702a8364b09cdc56 Mon Sep 17 00:00:00 2001 From: PoliEcho Date: Thu, 31 Jul 2025 20:57:06 +0200 Subject: [PATCH] add debug message --- src/client/net.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/client/net.rs b/src/client/net.rs index 098a321..e793f96 100644 --- a/src/client/net.rs +++ b/src/client/net.rs @@ -618,6 +618,18 @@ pub async fn handle_incoming_connection( "{} Notified about new client, creating NAT mapping", "[LOG]".blue() ); + + #[cfg(debug_assertions)] + eprintln!( + "registering network:\niv: {}\nsockaddr: {}", + &buf[P2PStandardDataPositions::IV as usize + ..P2PStandardDataPositions::IV as usize + BLOCK_SIZE].iter().map(|x| format!("{:02X} ", x)).collect::(), + &buf[P2PStandardDataPositions::DATA as usize..] + .iter() + .map(|x| format!("{:02X} ", x)) + .collect::(), + ); + let data_tmp: Box<[u8]>; let peer_addr: std::net::SocketAddr = match std::net::SocketAddr::from_str( match std::str::from_utf8(if network.read().unwrap().encrypted {