From 97b8129002aa56aea98a694770a5f4ecb2c291f4 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Sun, 14 Aug 2022 13:58:39 +0200 Subject: [PATCH] print ping --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 38ecf35..6e1983d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,4 +4,4 @@ version = 3 [[package]] name = "qft" -version = "0.1.8" +version = "0.1.9" diff --git a/Cargo.toml b/Cargo.toml index 1ae74f3..054891e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "qft" -version = "0.1.8" +version = "0.1.9" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index eda35de..a0af383 100644 --- a/src/main.rs +++ b/src/main.rs @@ -340,6 +340,7 @@ fn holepunch(args: &Vec) -> UdpSocket { holepunch.send(&[0]).expect("connection failed"); let result = holepunch.recv(&mut [0, 0]); if result.is_ok() && result.unwrap() == 1 { + println!("Ping: {}", unix_millis() - m); holepunch.send(&[0, 0]).expect("connection failed"); let result = holepunch.recv(&mut [0, 0]); if result.is_ok() && result.unwrap() == 2 { @@ -347,11 +348,7 @@ fn holepunch(args: &Vec) -> UdpSocket { } } } - println!( - "Holepunch and connection successful. Running with {} (partner) and :{} (you).", - bind_addr, - holepunch.local_addr().unwrap().port() - ); + println!("Holepunch and connection successful."); return holepunch; }