From c78ba11c97e03a98460be049b12d682dce1c87e4 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 20 Jan 2011 05:49:36 +0000 Subject: [PATCH] add client_test option to set active torrent limit --- examples/client_test.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 3e6499934..e46346621 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -841,6 +841,7 @@ int main(int argc, char* argv[]) " -W Set the max number of peers to keep in the peer list\n" " -N Do not attempt to use UPnP and NAT-PMP to forward ports\n" " -Y Rate limit local peers\n" + " -v Set the max number of active torrents\n" " -y Disable TCP connections (disable outgoing TCP and reject\n" " incoming TCP connections)\n" " -q automatically quit the client after of refreshes\n" @@ -1050,6 +1051,11 @@ int main(int argc, char* argv[]) case 'I': outgoing_interface = arg; break; case 'N': start_upnp = false; --i; break; case 'Y': settings.ignore_limits_on_local_network = false; --i; break; + case 'v': + settings.active_limit = atoi(arg); + settings.active_downloads = atoi(arg) / 2; + settings.active_seeds = atoi(arg) / 2; + break; case 'q': loop_limit = atoi(arg); break; } ++i; // skip the argument