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;