aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2014-01-22 23:01:39 +0800
committerGav Wood <i@gavwood.com>2014-01-22 23:01:39 +0800
commit2b13a04f495a9e81bbf4665ea552e4cbfe766e2a (patch)
treee2e54afe7e59aca7ac680eba36fbabcdcbc8d7dc
parent3b9040b4a1696f7841d0b80621e3d0910f0364f8 (diff)
downloaddexon-solidity-2b13a04f495a9e81bbf4665ea552e4cbfe766e2a.tar.gz
dexon-solidity-2b13a04f495a9e81bbf4665ea552e4cbfe766e2a.tar.zst
dexon-solidity-2b13a04f495a9e81bbf4665ea552e4cbfe766e2a.zip
Pinging.
-rw-r--r--peer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/peer.cpp b/peer.cpp
index 6a32c00e..64998fd5 100644
--- a/peer.cpp
+++ b/peer.cpp
@@ -49,10 +49,12 @@ int peerTest(int argc, char** argv)
if (!remoteHost.empty())
pn.connect(remoteHost, remotePort);
- while (true)
+ for (int i = 0; ; ++i)
{
usleep(100000);
pn.process();
+ if (!(i % 10))
+ pn.pingAll();
}
return 0;