Skip to main content

Module wire

Module wire 

Source
Expand description

The PEX wire — the four type-tagged JSON messages (SPEC §4) and their framing.

§The four messages

typePurpose
pex_handshakefirst message each direction: version + network + declared interval + own flags (§4.2)
pex_snapshotthe first data message: a capped picture of the sender’s first-hand set (§4.3)
pex_deltathe periodic message: added / dropped relative to what this link was told (§4.4)
pex_errorthe advisory error envelope (§4.5)

§Framing (SPEC §4.1)

JSON shapes are frozen: the type tags and field names are the wire contract, and unknown fields are ignored on receive (additive evolution).

Enums§

PexMessage
A PEX protocol message — one of the four type-tagged shapes (SPEC §4). The type tag and field names are the frozen wire contract.