From 5a15c8ebfb79a387decd5a126b68eb67a2caee25 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 1 Feb 2004 00:50:18 +0000 Subject: [PATCH] *** empty log message *** --- examples/client_test.cpp | 5 +++++ include/libtorrent/torrent_handle.hpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index cda60cc4b..7fc7d37a4 100755 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -316,6 +316,11 @@ int main(int argc, char* argv[]) a = ses.pop_alert(); while (a.get()) { + torrent_finished_alert* p = dynamic_cast(a.get()); + if (p) + { + ses.set_upload_rate_limit(30 * 1024); + } if (events.size() >= 10) events.pop_front(); events.push_back(a->msg()); a = ses.pop_alert(); diff --git a/include/libtorrent/torrent_handle.hpp b/include/libtorrent/torrent_handle.hpp index 029bde541..8a77de655 100755 --- a/include/libtorrent/torrent_handle.hpp +++ b/include/libtorrent/torrent_handle.hpp @@ -161,6 +161,8 @@ namespace libtorrent // to finish all pieces currently in the pipeline, and then // abort the torrent. + // TODO: add a max upload rate per torrent too. + // manually connect a peer void connect_peer(const address& adr) const;