mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 14:49:21 +00:00
The client is now responsible for sending completed to tracker, fixes
the problem where doing hash checking of completed torrents would cause wrong messages to be sent. Added option to the client for opening a random port in the supplied port range. Cleaned up ui::Download and ui::DownloadList handling of throttle keys and status bar. Added 60s timeout for handshakes. Added ignore key function to input::Bindings. Made the time span of torrent::Rate configurable. Seperate torrent::Rate object for quick and slow time span in torrent::ThrottleControl. Also limited the amount the throttle could over-allocate per tick, not completely fixed. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@480 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+11
-3
@@ -44,7 +44,7 @@ public:
|
||||
typedef sigc::slot1<void, DownloadList::iterator> SlotReady;
|
||||
typedef sigc::slot0<void> SlotFailed;
|
||||
|
||||
Manager() : m_portFirst(6890), m_portLast(6999) {}
|
||||
Manager() : m_portRandom(false), m_portFirst(6890), m_portLast(6999) {}
|
||||
|
||||
DownloadList& get_download_list() { return m_downloadList; }
|
||||
DownloadStore& get_download_store() { return m_downloadStore; }
|
||||
@@ -55,6 +55,9 @@ public:
|
||||
Log& get_log_important() { return m_logImportant; }
|
||||
Log& get_log_complete() { return m_logComplete; }
|
||||
|
||||
void set_port_random(bool v) { m_portRandom = v; }
|
||||
void set_port_range(int a, int b) { m_portFirst = a; m_portLast = b; }
|
||||
|
||||
void initialize();
|
||||
void cleanup();
|
||||
|
||||
@@ -66,14 +69,18 @@ public:
|
||||
|
||||
void check_hash(Download* d);
|
||||
|
||||
void set_port_range(int a, int b) { m_portFirst = a; m_portLast = b; }
|
||||
void receive_download_done(Download* d, bool check_hash);
|
||||
|
||||
private:
|
||||
void listen_open();
|
||||
|
||||
void create_http(const std::string& uri);
|
||||
void create_final(std::istream* s);
|
||||
|
||||
void receive_debug_tracker(std::istream* s);
|
||||
void prepare_hash_check(Download* d);
|
||||
|
||||
void receive_http_failed(std::string msg);
|
||||
void receive_download_done_hash_checked(Download* d);
|
||||
|
||||
DownloadList m_downloadList;
|
||||
DownloadStore m_downloadStore;
|
||||
@@ -84,6 +91,7 @@ private:
|
||||
Log m_logImportant;
|
||||
Log m_logComplete;
|
||||
|
||||
bool m_portRandom;
|
||||
int m_portFirst;
|
||||
int m_portLast;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user