Peer Exchange

Channels

Pex has one channel. The channel identifier is listed below.

NameNumber
PexChannel0

Message Types

PexRequest

PexRequest is an empty message requesting a list of peers.

EmptyRequest

PexResponse

PexResponse is an list of net addresses provided to a peer to dial.

NameTypeDescriptionField Number
addressesrepeated PexAddressList of peer addresses available to dial1

PexAddress

PexAddress provides needed information for a node to dial a peer. This is in the form of a URL that gets parsed into a NodeAddress. See ParseNodeAddress for more details.

NameTypeDescriptionField Number
urlstringSee golang url1

Message

Message is a oneof protobuf type. The one of consists of two messages.

NameTypeDescriptionField Number
pex_requestPexRequestEmpty request asking for a list of addresses to dial3
pex_responsePexResponseList of addresses to dial4