ttorrent
ttorrent copied to clipboard
Add Strategy Pattern in the piece selection algorithm
Hello guys,
I'm making this pull request to allow the programmer to choose the order which the chunks should be requested. Basicaly, now is possible to choose between RareFirstStrategy (is the original strategy from the lib) or IndexFirstStrategy (it selects pieces following the id order, it's good to stream videos using torrents).
I don't know if it's something that you wanted to add in this project, but was necessary for what I was doing.
Regards,