added proper support for dht router nodes (which are automatically used to bootstrap from, and won't get added to the routing table)

This commit is contained in:
Arvid Norberg
2006-09-27 17:20:18 +00:00
parent 411bc4895c
commit 910733f29e
13 changed files with 228 additions and 121 deletions

View File

@@ -575,14 +575,15 @@ int main(int ac, char* av[])
entry dht_state = bdecode(
std::istream_iterator<char>(dht_state_file)
, std::istream_iterator<char>());
ses.start_dht(dht_state);
}
catch (std::exception&)
{
ses.start_dht();
ses.add_dht_node(std::make_pair(std::string("router.bittorrent.com")
, 6881));
}
catch (std::exception&) {}
ses.start_dht();
ses.add_dht_router(std::make_pair(std::string("router.bittorrent.com")
, 6881));
ses.add_dht_router(std::make_pair(std::string("router.utorrent.com")
, 6881));
ses.add_dht_router(std::make_pair(std::string("router.bitcomet.com")
, 6881));
#endif
ses.set_max_half_open_connections(half_open_limit);