When to ping a receiver and when to give it up (pure, driven by a clock value, so tests do not sleep).
More...
When to ping a receiver and when to give it up (pure, driven by a clock value, so tests do not sleep).
The receivers ping a sender themselves (the desktop receiver after 3 s of silence and it ends the session after 6 s, the Android receiver every 2.5 s, see docs/tech.md); this class covers the receiver that does not: after pingAfter without any packet it asks for one Ping, after deadAfter without any packet the connection is dead. Any packet, whatever it is, counts as life. A Ping is asked for once per silence, not again until a packet came. Not thread safe: the watchdog thread.