frostwire / frostwire-jlibtorrent

A swig Java interface for libtorrent by the makers of FrostWire. Develop libtorrent based apps with the joy of coding in Java.
http://www.frostwire.com
MIT License
444 stars 137 forks source link

[Feature Request] Always contact all trackers #247

Closed vickyoo7 closed 3 years ago

vickyoo7 commented 3 years ago

I'm not sure if it's possible or already available but I'd like to request the feature to always contact all trackers, currently only couple of trackers are being contacted and rest are in not contacted state even after force announcing trackers are no contacted.

gubatron commented 3 years ago

I wonder if this is a libtorrent heuristic or if it's already an option that we might have not exposed in the Java wrapper.

Could you please check the libtorrent documentation and/or source code, look for "tracker" "announce" "announcement"

Let's see what you can find before we bother Arvid with questions.

For all we know it might just be a torrent_handle option that's already there.

vickyoo7 commented 3 years ago

announcement

I couldn't find any reference for contacting all trackers in libtorrent source or documentation

gubatron commented 3 years ago

I's suggest reading announce endpoint and announce entry to understand the timing of the announces and when they can be done https://github.com/arvidn/libtorrent/blob/RC_1_2/include/libtorrent/announce_entry.hpp

gubatron commented 3 years ago

Also relevant: https://github.com/arvidn/libtorrent/blob/RC_1_2/include/libtorrent/tracker_manager.hpp https://github.com/arvidn/libtorrent/blob/RC_1_2/include/libtorrent/udp_tracker_connection.hpp

vickyoo7 commented 3 years ago

Also relevant: https://github.com/arvidn/libtorrent/blob/RC_1_2/include/libtorrent/tracker_manager.hpp https://github.com/arvidn/libtorrent/blob/RC_1_2/include/libtorrent/udp_tracker_connection.hpp

Thanks, I'll check it out and update

gubatron commented 3 years ago

I think what I'd do would be to write a quick program in C++ with libtorrent and put a breakpoint in the tracker_manager and announce_endpoint calls to see if all the trackers in the torrent are being called as you expect.