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

Ability to prioritize blocks/pieces/chunks/files when downloading #39

Closed
voxadam opened this issue Nov 9, 2015 · 3 comments
Closed

Comments

@voxadam
Copy link

voxadam commented Nov 9, 2015

It would be very beneficial in many applications if anacrolix/torrent had a method for setting the download priority of individual blocks/pieces/chunks (BitTorrent terminology can be somewhat confusing, if not poorly defined in the first place).

While I understand the objections many people have related to selective or "streaming" as there can be a negative effect to the health of the greater swarm as a whole. The thing is, in many cases BitTorrent is used in controlled environments where it's known in advance that such an tactic is perfectly acceptable as it's already been established that there are enough clients with complete copies of the files being shared to sustain a healthy swarm.

anacrolix/torrent isn't a mainstream file sharing client in the same way that µTorrent or Vuze are; it's a library to be incorporated into larger projects where the developers are (hopefully) fully capable of understanding the ramifications of granular prioritization such as this.

@anacrolix
Copy link
Owner

Hi Adam, this is already supported through https://godoc.org/github.com/anacrolix/torrent#Torrent.SetRegionPriority and https://godoc.org/github.com/anacrolix/torrent#File.PrioritizeRegion. There's also a helper, https://godoc.org/github.com/anacrolix/torrent#Torrent.DownloadAll. These do what you'd expect: no ordering is assumed between regions of the same priority, and even with different priorities pieces may be favoured if they have higher priority but it will still mix it up.

@anacrolix
Copy link
Owner

Let me know if you have some particular need that isn't met.

@voxadam
Copy link
Author

voxadam commented Nov 9, 2015

I'm terribly sorry. I'd say that I have no idea how I missed those functions but I'm fairly sure it's fairly sure it has something to do with the fact that it's 0318 in the morning here and I should have gone to bed a couple hours ago.

Feel free to close this erroneous issue. Again, sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants