From: P2P-Next Date: Thu, 12 Aug 2010 14:57:51 +0000 (+0300) Subject: instrumentation/hrktorrent: print peers' IP addresses X-Git-Tag: next-share-m32~12 X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=0c8b5347c055d642439a95145250ec35d539d56f;p=cs-p2p-next.git instrumentation/hrktorrent: print peers' IP addresses --- 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++; }