Expand description
The libp2p node: TCP and QUIC (or an in-memory transport for tests) with Noise and Yamux; mDNS on the local network; Kademlia, identify and ping; relay client and (opt-in) relay server with DCUtR hole punching; AutoNAT; and request-response on the profile’s protocol id, carrying the application’s own request and response types (CBOR).
The swarm runs on its own thread with a small Tokio runtime. Node is a blocking
handle (the CLI and TUI are synchronous): requests wait for their answer. Requests
that come in are answered by a Handler on Tokio’s blocking pool.
Structs§
- Node
- A running node.
- Node
Config - How a node runs.
- Relay
Limits - Limits of the relay server: how many reservations and circuits it holds, and how long
and how much one circuit may carry.
RelayLimits::defaultkeeps libp2p’s defaults (circuits for hole punching and small requests: 2 minutes, 128 KiB);RelayLimits::unlimitedcaps nothing, so circuits carry data. - Sighting
- A peer seen by the node, for the handler to remember.
- Status
- What the node is doing.