exp backoff and theads handling

This commit is contained in:
TIBERGHIEN corentin
2026-01-20 01:10:09 +01:00
parent 08518892f2
commit dacedd1ceb
9 changed files with 469 additions and 331 deletions

View File

@@ -120,10 +120,7 @@ impl eframe::App for P2PClientApp {
self.known_peers = peers;
}
NetworkEvent::FileTreeReceived(_peer_id, _) => {
todo!();
//self.loaded_tree_nodes.insert(_peer_id, tree);
NetworkEvent::FileTreeReceived(node_hash, merklenode) => {
//self.status_message = "🔄 File tree updated successfully.".to_string();
}
NetworkEvent::FileTreeRootReceived(peer_id, root_hash) => {
@@ -406,9 +403,10 @@ impl eframe::App for P2PClientApp {
_ => {}
}
if ui.button("Send Ping").clicked() {
let res = self
.network_cmd_tx
.send(NetworkCommand::Ping(peer.0.to_string()));
let res = self.network_cmd_tx.send(NetworkCommand::Ping(
peer.0.to_string(),
self.connected_address.clone(),
));
}
if ui.button("Send Nat Traversal Request").clicked() {
match self.network_cmd_tx.send(NetworkCommand::NatTraversal(