diff options
author | Gav Wood <i@gavwood.com> | 2014-01-22 23:01:39 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2014-01-22 23:01:39 +0800 |
commit | 2b13a04f495a9e81bbf4665ea552e4cbfe766e2a (patch) | |
tree | e2e54afe7e59aca7ac680eba36fbabcdcbc8d7dc /peer.cpp | |
parent | 3b9040b4a1696f7841d0b80621e3d0910f0364f8 (diff) | |
download | dexon-solidity-2b13a04f495a9e81bbf4665ea552e4cbfe766e2a.tar dexon-solidity-2b13a04f495a9e81bbf4665ea552e4cbfe766e2a.tar.gz dexon-solidity-2b13a04f495a9e81bbf4665ea552e4cbfe766e2a.tar.bz2 dexon-solidity-2b13a04f495a9e81bbf4665ea552e4cbfe766e2a.tar.lz dexon-solidity-2b13a04f495a9e81bbf4665ea552e4cbfe766e2a.tar.xz dexon-solidity-2b13a04f495a9e81bbf4665ea552e4cbfe766e2a.tar.zst dexon-solidity-2b13a04f495a9e81bbf4665ea552e4cbfe766e2a.zip |
Pinging.
Diffstat (limited to 'peer.cpp')
-rw-r--r-- | peer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |