Dave Cridland wrote:
On Mon Jan 21 18:52:54 2008, Yann Leboulanger wrote:
In gajim we send whitespace ping if we haven't received or sent anything in the past 55 seconds (cause some nat server close connection if nothing happen in a minute) But whitespace ping are not enough, so replacing it with xmpp-ping with the same time would be nice.


Mhh. Okay. Whitespace pings aren't enough to tell if the connection is actively able to send and receive packets. XEP-0199 tells you not only that, but it also tells you whether the thing you're pinging is willing and able to respond.

Both have a use, although for c2s links, XEP-0198 is rather more powerful.

Don't confuse those use-cases, because whether or not you use XEP-0199 to test c2s connectivity, whitespace pings are still lighter, and perfect for keeping recalcitrant NATs in line.

XEP-0199 is particularly useful when you're expecting a response, but don't seem to be getting anything.


about the time for answer, are some network connection or server so slow that it can reply only 20 seconds later? I have no feedback on that, but isn't 5 or 10 seconds enough?

HF radio links would need much more, whereas a DSL link would need less.

A good rule of thumb might be 10 times the normal RTT. (Which you can detirmine by the usual response to XEP-0199 pings).

IMHO, a nice UI would simply note that the latency seemed tremendously high, and offer to reconnect, rather than kill the session - as Michal pointed out, the user often knows what the situation is.

Dave.

Ha yes I didn't know XEP 198 has a ping section. But we don't get an answer, at least with my ejabberd. And in this case an answer is usefulle to know if server is still alive. So I think XEP 199 is better.

--
Yann

Reply via email to