add debug message

This commit is contained in:
PoliEcho 2025-07-31 20:57:06 +02:00
parent 5dfad8264e
commit 2f811db0a3

View File

@ -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::<String>(),
&buf[P2PStandardDataPositions::DATA as usize..]
.iter()
.map(|x| format!("{:02X} ", x))
.collect::<String>(),
);
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 {