Skip to main content

Module mesh_serve

Module mesh_serve 

Source
Expand description

Mesh accept loop and seed-connect loop (P3-K0).

Moved out of boot.rs unchanged in behaviour so a machine mesh service can reuse them. serve_listener owns the per-connection Noise responder handshake and the bidirectional pump; connect_seeds dials the configured seed peers as Noise initiator.

Structs§

SeedSpec
One configured seed: the address to dial and, when the operator pinned it, the node id the seed must claim. Written addr or addr#node-id.

Functions§

connect_seeds
Dial each seed peer in its own task (Noise initiator when noise is set) and register it with runtime. Returns immediately.
parse_seed
Parse one seed_peers entry (addr or addr#node-id).
seed_specs
The seeds to dial: parsed, unusable entries skipped with a warning, and one entry per address (the first wins; a different pin on a repeat is reported, not honoured).
serve_listener
Accept connections on listener forever, pumping each through runtime. Spawn this on a task; it never returns.
serve_listener_with
serve_listener with explicit Limits (tests use short ones).
transport_for
Build the transport for a kernel.mesh.transport name.