Open jmcph4 opened 3 years ago
BEP 3 specifies several messages that comprise the BitTorrent peer protocol:
There are a few implementation strategies that come to mind:
Neither seem very clean at the moment. Some things to consider:
Choke
Unchoke
Interested
Not Interested
Have
Bitfield
Request
Piece
Cancel
@alecdwm Keen to hear your input from a design perspective.
An additional resource which (while unofficial) is very helpful: BitTorrentSpecification.
Description
BEP 3 specifies several messages that comprise the BitTorrent peer protocol:
There are a few implementation strategies that come to mind:
Neither seem very clean at the moment. Some things to consider:
Acceptance Criteria
Choke
messages can be readChoke
messages can be writtenUnchoke
messages can be readUnchoke
messages can be writtenInterested
messages can be readInterested
messages can be writtenNot Interested
messages can be readNot Interested
messages can be writtenHave
messages can be readHave
messages can be writtenBitfield
messages can be readBitfield
messages can be writtenRequest
messages can be readRequest
messages can be writtenPiece
messages can be readPiece
messages can be writtenCancel
messages can be readCancel
messages can be written