mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-20 08:06:18 +00:00
* Adding TrackerManager class that implements a simpler interface for
tracker control. It will support different modes like f.ex trying to request more peers from the trackers. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@519 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+2
-2
@@ -237,8 +237,8 @@ Download::bind_keys() {
|
|||||||
(*m_bindings)['5'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_max_peers), -5);
|
(*m_bindings)['5'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_max_peers), -5);
|
||||||
(*m_bindings)['6'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_max_peers), 5);
|
(*m_bindings)['6'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_max_peers), 5);
|
||||||
|
|
||||||
(*m_bindings)['t'] = sigc::bind(sigc::bind(sigc::mem_fun(m_download->get_download(), &torrent::Download::set_tracker_timeout), false), 2 * 1000000);
|
(*m_bindings)['t'] = sigc::bind(sigc::mem_fun(m_download->get_download(), &torrent::Download::tracker_manual_request), false);
|
||||||
(*m_bindings)['T'] = sigc::bind(sigc::bind(sigc::mem_fun(m_download->get_download(), &torrent::Download::set_tracker_timeout), true), 2 * 1000000);
|
(*m_bindings)['T'] = sigc::bind(sigc::mem_fun(m_download->get_download(), &torrent::Download::tracker_manual_request), true);
|
||||||
|
|
||||||
(*m_bindings)['p'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_PEER_INFO);
|
(*m_bindings)['p'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_PEER_INFO);
|
||||||
(*m_bindings)['o'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_TRACKER_LIST);
|
(*m_bindings)['o'] = sigc::bind(sigc::mem_fun(*this, &Download::receive_change), DISPLAY_TRACKER_LIST);
|
||||||
|
|||||||
@@ -57,9 +57,10 @@ public:
|
|||||||
void set_slot(Slot s) { m_slot = s; }
|
void set_slot(Slot s) { m_slot = s; }
|
||||||
|
|
||||||
iterator get_iterator() { return m_iterator; }
|
iterator get_iterator() { return m_iterator; }
|
||||||
|
const iterator get_iterator() const { return m_iterator; }
|
||||||
void set_iterator(iterator itr) { m_iterator = itr; }
|
void set_iterator(iterator itr) { m_iterator = itr; }
|
||||||
|
|
||||||
const Timer& get_time() { return m_iterator->first; }
|
const Timer& get_time() const { return m_iterator->first; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TaskItem(const TaskItem& t);
|
TaskItem(const TaskItem& t);
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
|
|
||||||
void execute(Timer time);
|
void execute(Timer time);
|
||||||
|
|
||||||
bool is_scheduled(TaskItem* task) { return task->get_iterator() != end(); }
|
bool is_scheduled(const TaskItem* task) const { return task->get_iterator() != end(); }
|
||||||
|
|
||||||
Timer get_next_timeout() const { return begin()->first; }
|
Timer get_next_timeout() const { return begin()->first; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user