You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Jae Kwon 335b7a5984 ... 10 years ago
..
upnp package rename peer -> p2p 11 years ago
README.md fixed algorithm 10 years ago
addrbook.go fix basic tests. 10 years ago
addrbook_test.go addrbook cleanup 11 years ago
connection.go fix basic tests. 10 years ago
listener.go refactor from Binary centric model to global method model 10 years ago
log.go fix test cases 10 years ago
netaddress.go refactor from Binary centric model to global method model 10 years ago
peer.go fixed algorithm 10 years ago
peer_set.go implementing block_manager. currently only supports one datatype. 10 years ago
pex_reactor.go fix basic tests. 10 years ago
switch.go ... 10 years ago
switch_test.go fix basic tests. 10 years ago
util.go cleanup 11 years ago

README.md

P2P Module

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.

Channels

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
  • pexRequestMsg
  • pexResponseMsg

Resources