From b7adf89f55b433d17c0b8790e850b464d59807cf Mon Sep 17 00:00:00 2001 From: arvidn Date: Wed, 8 Aug 2018 10:34:03 +0200 Subject: [PATCH] make client_test able to include connection attempts in peer list --- examples/client_test.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 1d9fdb253..6ef6ed6d6 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -179,6 +179,7 @@ retry: bool print_trackers = false; bool print_peers = false; +bool print_connecting_peers = false; bool print_log = false; bool print_downloads = false; bool print_matrix = false; @@ -326,8 +327,11 @@ int print_peer_info(std::string& out for (std::vector::const_iterator i = peers.begin(); i != peers.end(); ++i) { - if (i->flags & (peer_info::handshake | peer_info::connecting)) + if ((i->flags & (peer_info::handshake | peer_info::connecting) + && !print_connecting_peers)) + { continue; + } if (print_ip) { @@ -1570,6 +1574,7 @@ example alert_masks: if (c == 'x') print_disk_stats = !print_disk_stats; // toggle columns if (c == '1') print_ip = !print_ip; + if (c == '2') print_connecting_peers = !print_connecting_peers; if (c == '3') print_timers = !print_timers; if (c == '4') print_block = !print_block; if (c == '5') print_peer_rate = !print_peer_rate; @@ -1612,7 +1617,7 @@ up/down arrow keys: select torrent [y] toggle show piece matrix COLUMN OPTIONS -[1] toggle IP column [2] +[1] toggle IP column [2] toggle show peer connection attempts [3] toggle timers column [4] toggle block progress column [5] toggle peer rate column [6] toggle failures column [7] toggle send buffers column