implementation
This commit is contained in:
@@ -360,11 +360,9 @@ impl eframe::App for P2PClientApp {
|
||||
.loaded_fs
|
||||
.contains_key(self.active_peer.as_ref().unwrap())
|
||||
{
|
||||
todo!();
|
||||
// let _ = self.network_cmd_tx.send(NetworkCommand::RequestDirectoryContent(
|
||||
// peer.clone(),
|
||||
// peer.clone(),
|
||||
// ));
|
||||
let _ = self
|
||||
.network_cmd_tx
|
||||
.send(NetworkCommand::ConnectPeer(peer.clone()));
|
||||
}
|
||||
}
|
||||
selectable.context_menu(|ui| {
|
||||
@@ -386,10 +384,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
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user