Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

choke message from peer is not handled #65

Open
kilork opened this issue May 10, 2020 · 0 comments
Open

choke message from peer is not handled #65

kilork opened this issue May 10, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@kilork
Copy link
Owner

kilork commented May 10, 2020

unhandled message from peer: Choke

http://www.bittorrent.org/beps/bep_0003.html

Connections contain two bits of state on either end: choked or not, and interested or not. Choking is a notification that no data will be sent until unchoking happens. The reasoning and common techniques behind choking are explained later in this document.

Data transfer takes place whenever one side is interested and the other side is not choking. Interest state must be kept up to date at all times - whenever a downloader doesn't have something they currently would ask a peer for in unchoked, they must express lack of interest, despite being choked. Implementing this properly is tricky, but makes it possible for downloaders to know which peers will start downloading immediately if unchoked.

choke and not interested logic is completely missing currently. Even it works somehow, a spirit of protocol is not preserved.

We must support and cover this with test cases.

@kilork kilork added the bug Something isn't working label May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant