implementation

This commit is contained in:
Tiago Batista Cardoso
2026-01-15 22:01:48 +01:00
committed by TIBERGHIEN corentin
parent 003d55bd75
commit 60145f279a
5 changed files with 181 additions and 95 deletions

View File

@@ -380,7 +380,7 @@ impl eframe::App for P2PClientApp {
{
//todo!();
let _ = self.network_cmd_tx.send(NetworkCommand::Discover(
peer.clone(),
peer.0.clone(),
"root".to_string(),
self.connected_address.clone(),
));
@@ -405,10 +405,29 @@ impl eframe::App for P2PClientApp {
}
_ => {}
}
if ui.button("Send Ping").clicked() {
let res = self
.network_cmd_tx
.send(NetworkCommand::Ping(peer.0.to_string()));
}
if ui.button("Send Nat Traversal Request").clicked() {
match self.network_cmd_tx.send(NetworkCommand::NatTraversal(
peer.0.to_string(),
self.connected_address.clone(),
)) {
Ok(_) => {
print!("[+] successfully sent nat traversal request")
}
Err(_) => {
print!("[-] failed to send nat traversal request")
}
}
}
if ui.button("Infos").clicked() {
// action 3
ui.close();
}
// ... autres boutons
});
}