proto: basic peer wire protocol that can download

This commit is contained in:
2016-12-13 00:59:36 -05:00
parent 74e82a0127
commit 0f76269952
16 changed files with 828 additions and 42 deletions

8
design.md Normal file
View File

@@ -0,0 +1,8 @@
* A torrent should have multiple workers (seed vs download workers?).
* These workers work with connections, if one break they find another one.
* The connection broker manages connections, choking/unchoking.
* Connection are linked to a peer & their bitfield.
* Connections need to be listened to at all times for choke/unchoke/have/timeout/interested
* A worker takes over a connection to send/receive.
* The connection broker opens news connections if none are available for
the workers