dht: add public address reporting

This commit is contained in:
Adrien Béraud committed 2015-08-06 15:41:16 -04:00
1 parent 02d4afa555
commit 873fbd3d8e
4 files changed
+135 -20

No files matched your search

+6
View File
@@ -142,6 +142,12 @@ main(int argc, char **argv)
std::cout << "Searches:" << std::endl;
std::cout << dht.getSearchesLog() << std::endl;
continue;
} else if (op == "la") {
std::cout << "Reported public addresses:" << std::endl;
auto addrs = dht.getPublicAddressStr();
for (const auto& addr : addrs)
std::cout << addr << std::endl;
continue;
} else if (op == "log") {
do_log = !do_log;
if (do_log)