Jae Kwon c3fc1a39ea | 10 years ago | |
---|---|---|
.. | ||
upnp | 11 years ago | |
README.md | 10 years ago | |
addrbook.go | 10 years ago | |
addrbook_test.go | 11 years ago | |
connection.go | 10 years ago | |
listener.go | 10 years ago | |
log.go | 10 years ago | |
netaddress.go | 10 years ago | |
peer.go | 10 years ago | |
peer_set.go | 10 years ago | |
pex_reactor.go | 10 years ago | |
switch.go | 10 years ago | |
switch_test.go | 10 years ago | |
util.go | 11 years ago |
P2P provides an abstraction around peer-to-peer communication.
Communication happens via Reactors that react to messages from peers.
Each Reactor has one or more Channels of communication for each Peer.
Channels are multiplexed automatically and can be configured.
A Switch is started upon app start, and handles Peer management.
A PEXReactor implementation is provided to automate peer discovery.
Each peer connection is multiplexed into channels. The p2p module comes with a channel implementation used for peer discovery (called PEX, short for "peer exchange").
Channel | "PEX" |
Messages |
|