The Peer Channel Protocol is used for broadcasting messages over a virtual network of cooperating nodes. This protocol is used to send and receive messages between nodes in a named mesh. The nodes form the network by establishing connections to each other using a discovery service in which every node registers itself into a named mesh and discovers other nodes using the name of the mesh. The network is not fully connected. Instead, it is sparsely connected, yet a message sent by any node is propagated to the entire mesh by nodes forwarding to each other in a cooperative manner.
Each node forwards a message to all other neighbors. Each node is responsible for detecting and dropping duplicates of a message.
Each node maintains connections to a few other nodes in the mesh. A node must track the health of the neighbor connection and tune its neighbor set based on the utility of the neighbor connection.
Sections 1.8, 2, and 3 of this specification are normative and can contain the terms MAY, SHOULD, MUST, MUST NOT, and SHOULD NOT as defined in RFC 2119. Sections 1.5 and 1.9 are also normative but cannot contain those terms. All other sections and examples in this specification are informative.