fixed problems in the network layer that made web seeds fail some times. prepared for proxy support in peer connections. worked on the http seeding. added support for web seeds in make_torrent tool

This commit is contained in:
Arvid Norberg
2007-02-12 05:46:29 +00:00
parent e324cfc519
commit 98b92e3f02
15 changed files with 356 additions and 187 deletions

View File

@@ -860,7 +860,9 @@ int main(int ac, char* av[])
out << state_str[s.state] << " ";
}
h.get_peer_info(peers);
if ((print_downloads && s.state != torrent_status::seeding)
|| print_peers)
h.get_peer_info(peers);
if (s.state != torrent_status::seeding)
{

View File

@@ -77,10 +77,11 @@ int main(int argc, char* argv[])
path::default_name_check(no_check);
if (argc != 4)
if (argc != 4 && argc != 5)
{
std::cerr << "usage: make_torrent <output torrent-file> "
"<announce url> <file or directory to create torrent from>\n";
"<announce url> <file or directory to create torrent from> "
"[url-seed]\n";
return 1;
}
@@ -113,6 +114,9 @@ int main(int argc, char* argv[])
t.set_creator(creator_str);
if (argc == 5)
t.add_url_seed(argv[4]);
// create the torrent and print it to out
entry e = t.create_torrent();
libtorrent::bencode(std::ostream_iterator<char>(out), e);