From 8ae3d55e7f793ee6555de9eb40d675458e2e2fe1 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Oct 2026 17:36:23 +0100 Subject: add links messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce two new wire messages, LINKS and LINKS_REPLY (swarm::links). A member answers with its links: for each peer, the transport, whether it’s relayed, the RTT, and whether it’s dormant. It answers members only, at most every 5 s. This bumps wire::VERSION to 7. Every build answers, with or without the feature, so every node needs this patch before the map shows anything beyond its own node. --- src/swarm/peer/inbound.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/swarm/peer') diff --git a/src/swarm/peer/inbound.rs b/src/swarm/peer/inbound.rs index 6a149a2..d4df6c7 100644 --- a/src/swarm/peer/inbound.rs +++ b/src/swarm/peer/inbound.rs @@ -160,6 +160,12 @@ pub(crate) async fn handle_message( transport::ParsedMessage::StatusReply(remote) => { on_status(state, &peer, &remote, reactivated).await; } + transport::ParsedMessage::Links(request) => { + crate::swarm::links::answer(state, &peer, request).await; + } + transport::ParsedMessage::LinksReply(reply) => { + crate::swarm::links::received(state, &peer, reply); + } transport::ParsedMessage::Who(_) | transport::ParsedMessage::Me(_) | transport::ParsedMessage::Ping(_) -- cgit v1.3.1