aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/peer/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 04:32:36 +0100
committertv <tv@krebsco.de>2026-10-26 04:32:36 +0100
commit077f3647ad88cc44647a16dab9deed2e8a37723e (patch)
tree81007cc87c5ad8537699d0fd47fc28776e130787 /src/swarm/peer/mod.rs
parentd424ce413d3a9701c2c294ed40bdbdbcd3b90e82 (diff)
split peer module
Diffstat (limited to 'src/swarm/peer/mod.rs')
-rw-r--r--src/swarm/peer/mod.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/swarm/peer/mod.rs b/src/swarm/peer/mod.rs
new file mode 100644
index 0000000..086f5d2
--- /dev/null
+++ b/src/swarm/peer/mod.rs
@@ -0,0 +1,26 @@
+//! Peers: handshake (HELLO / HELLO_REPLY), liveness and keepalives, self-healing,
+//! swarm-wide forget records, and dispatch of inbound messages.
+//!
+//! * `handshake`: discovering peers, HELLO / HELLO_REPLY, membership.
+//! * `keepalive`: PING / PONG and the self-healing re-handshake.
+//! * `epoch`: the epochs peers advertise.
+//! * `admit`: admission with a swarm key.
+//! * `forget`: swarm-wide forget records.
+//! * `worker`: the periodic peer worker.
+//! * `inbound`: dispatch of inbound messages.
+
+mod admit;
+mod epoch;
+mod forget;
+mod handshake;
+mod inbound;
+mod keepalive;
+mod worker;
+
+pub(crate) use forget::forgotten_path;
+pub(crate) use handshake::{
+ apply_neighbour_change, peer_swarm, rehandshake, remember_peer, send_hello_once,
+};
+pub(crate) use inbound::handle_message;
+pub(crate) use keepalive::send_ping;
+pub(crate) use worker::run_peer_worker;