ttorrent icon indicating copy to clipboard operation
ttorrent copied to clipboard

Add Strategy Pattern in the piece selection algorithm

Open era opened this issue 8 years ago • 0 comments

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,

era avatar Oct 21 '15 18:10 era