* Cleaned up torrent::ProtocolBuffer.

* Added enums to torrent::Tracker to allow the client to check
whetever the tracker is an UDP or HTTP tracker.

* Added "enable_udp_trackers" setting for disabling the use of UDP
trackers, enabled by default.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@498 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-07-13 18:51:19 +00:00
parent d02ded1d4c
commit 7a9010445b
10 changed files with 82 additions and 56 deletions
+7
View File
@@ -76,6 +76,13 @@ Download::set_root_directory(const std::string& d) {
(m_download.get_entry_size() > 1 ? m_download.get_name() : ""));
}
void
Download::enable_udp_trackers(bool state) {
for (int i = 0, last = m_download.get_tracker_size(); i < last; ++i)
if (m_download.get_tracker(i).get_type() == torrent::Tracker::TRACKER_UDP)
m_download.get_tracker(i).enable(state);
}
void
Download::release_download() {
if (!m_download.is_valid())