From 01c20353a4124370a37243ffb3358b359f0b6a99 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 20 Sep 2007 01:21:43 +0000 Subject: [PATCH] added IP to client_test --- examples/client_test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index fbf7c5376..cedd931db 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -303,7 +303,7 @@ int peer_index(libtorrent::tcp::endpoint addr, std::vector const& peers) { using namespace libtorrent; - out << " down (total) up (total) sent-req recv flags source fail hshf sndb inactive wait disk block-progress " + out << "IP down (total) up (total) sent-req recv flags source fail hshf sndb inactive wait disk block-progress " #ifndef TORRENT_DISABLE_RESOLVE_COUNTRIES "country " #endif @@ -316,6 +316,10 @@ void print_peer_info(std::ostream& out, std::vector const continue; out.fill(' '); + std::stringstream ip; + ip << i->ip.address().to_string() << ":" << i->ip.port(); + out.width(22); + out << ip.str() << " "; out.width(2); out << esc("32") << (i->down_speed > 0 ? add_suffix(i->down_speed) + "/s " : " ") << "(" << add_suffix(i->total_download) << ") " << esc("0")