P+2 Protocol: An Implementation Guide
P+2 Protocol: An Implementation Guide
An implementation guide
P+2 tasks
Each peer has to maintain a list of other
known peers (peer management)
Each peer can ask other peers for certain
content (search)
Each peer can dowload content from
another peer (data transfer)
P+2 reference
implementation
Assignment#4 Assignment#3
User interface
Query
Matches
list
Selection
of file to
download
Peer list management
Connect to other peer(P)
Send a line containing your peer id
Receive a list of peer id
The list ends when the other peer closes
the connection
Repeat the process with a new peer every
ten seconds
User interface