From 0c8b5347c055d642439a95145250ec35d539d56f Mon Sep 17 00:00:00 2001 From: P2P-Next Date: Thu, 12 Aug 2010 17:57:51 +0300 Subject: [PATCH] instrumentation/hrktorrent: print peers' IP addresses --- instrumentation/hrktorrent/core.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/instrumentation/hrktorrent/core.cpp b/instrumentation/hrktorrent/core.cpp index 2295407..e5de712 100644 --- a/instrumentation/hrktorrent/core.cpp +++ b/instrumentation/hrktorrent/core.cpp @@ -52,7 +52,8 @@ PrintStatusStream(std::stringstream &output, int columns, int stdout_is_tty) } if (stdout_is_tty) { - std::cout << s_output.c_str() << "\r"; + /*std::cout << s_output.c_str() << "\r";*/ + std::cout << s_output.c_str() << std::endl; } else { std::cout << s_output.c_str() << std::endl; @@ -145,6 +146,11 @@ CCore::StatusLoop(void* data) /* build peer status message */ t->get_peer_info(peers); + std::vector::iterator it = peers.begin(); + while (it != peers.end()) { + std::cout << it->ip << std::endl; + } + sleep(1); loopcount++; } -- 2.20.1