File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010#include < libtorrent/bencode.hpp>
1111#include < libtorrent/create_torrent.hpp>
1212#include < libtorrent/session.hpp>
13+ #include < libtorrent/session_settings.hpp>
1314#include < libtorrent/storage_defs.hpp> // lt::disabled_storage_constructor
1415#include < libtorrent/torrent_handle.hpp>
1516#include < libtorrent/torrent_info.hpp>
1617
1718namespace lt = libtorrent;
1819int main (int argc, char *argv[]) {
1920 std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
21+
22+ lt::session_settings sset;
23+ sset.prefer_udp_trackers = false ;
24+
2025 if (argc != 2 ) {
2126 std::cerr << " usage: " << argv[0 ] << " <magnet-url>" <<
2227 std::endl;
2328 return 1 ;
2429 }
2530
2631 lt::session sess;
32+ sess.set_settings (sset);
2733 lt::add_torrent_params atp;
2834 atp.url = argv[1 ];
2935 atp.upload_mode = true ;
You can’t perform that action at this time.
0 commit comments