Skip to main content

Module messages

Module messages 

Source
Expand description

Wire messages for the Kademlia DHT plane.

Two transports:

  • KadNetMsg over a length-prefixed framed TCP/TLS/QUIC connection (lookup-plane), with KadNetCmd as the command tag.
  • RefreshMsg directly over UDP (refresh-plane).

Structs§

FindPeerMsg
FindPeer payload: target peer id we want closest peers for.
KadNetMsg
Wire envelope for the kademlia lookup-plane (LookupService’s own short-lived TCP/TLS/QUIC connections).
KadNetMsgCodec
Length-prefixed bincode codec for the kademlia lookup-plane wire.
KadNetMsgHeader
PeerMsg
Peer payload: a single peer’s advertised addresses + protocol bloom.
PeersMsg
Peers payload: list of peer entries returned by FindPeer.
PingMsg
Ping payload: liveness + version probe.
PongMsg
Pong payload echoing back the nonce.

Enums§

KadNetCmd
Commands valid on the kademlia lookup-plane wire.
RefreshMsg
Refresh-plane message sent directly over UDP. No envelope/codec because each datagram carries one self-describing message.