[Standards] Whitespace "ping"

Florian Schmaus flo at geekplace.eu
Tue Jun 11 13:50:00 UTC 2019


On 11.06.19 14:41, Philipp Hörist wrote:
> Hi,
> 
> So what is the best practice as a desktop client? As i also currently
> review the whitespace sending code.
> 
> Is every 10 seconds too much?

I won't get much into the discussion about the interval, but you should
at least not unconditionally send pings periodically, but instead take
the connection-idle period into account. That is, don't send a ping if
you have just received data from the socket a second ago.

For example, on Android I wind up an alarm every 15(/30) minutes, which
checks the timestamp when the last stream element was received (or
send), and if if the connection has been idle for more then 15(/30)
minutes, I request a ping. Works pretty well for me.

- Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 618 bytes
Desc: OpenPGP digital signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20190611/829c830f/attachment.sig>


More information about the Standards mailing list