[jdev] XEP-0199 (XMPP Ping) to test reliability
Yann Leboulanger
asterix at lagaule.org
Wed Jan 23 02:49:07 CST 2008
Tomasz Sterna a écrit :
> On Pn, 2008-01-21 at 19:34 +0100, Yann Leboulanger wrote:
>>> Not really. It's pretty verbose. We generally prefer to send
>> whitespace
>>> over the TCP connection. We usually call that "whitespace ping".
>
> I thought "keepalives" is a more common name. :-)
>
>
>> That won't inform us if connection is brocken or server is down as
>> those whitespace ping don't receive a pong ...
>
> Not fully true.
> You really do not receive "pongs" at the application level, but you
> really do not need to.
>
> Every sent TCP packed is ACK'ed on the TCP level. If it isn't ACKed it
> is resent a few times until a timeout is reached and the broken
> connection is signalled to the application level.
hmm interesting, I'll try to see what I can do in python. That's indeed
better that XEP-198 and XEP-199 for what I want to do.
> Other option is immediate detection of broken connection by receiving
> NACK. This also is signalled to the application level.
That sound a bit hard to disconenct when the first packet is not received :)
> This is all going "under the hood" and there is no reason to reimplement
> it at again at application level. The TCP layer implementation is
> usually very effective.
> You may want to tune the timeout values though, but most modern OSes
> have it set up at reasonable defaults.
>
you know what "reasonable defaults" means ? some minutes ?
--
Yann
More information about the JDev
mailing list