[JDEV] Detecting client/server disconnect?
Jens Alfke
jens at mac.com
Fri Apr 6 11:58:25 CDT 2001
How does the Jabber protocol deal with the unexpected disconnection of a
client or server? I'm referring not to a process crash, but to unlikely
situations like kernel panic or power failure, as well as more likely
ones like network failure (modem hangs up, PacBell's DSL network horks,
laptop moves out of 802.11 range, baby yanks out Ethernet plug, etc.)
According to R. Stevens' Unix Network Programming, vol. 1 (pp.185-186),
this situation is not detectable unless the SO_KEEPALIVE socket option
is set. (But libjabber doesn't set this option.) And even keepalive only
detects it after two hours, which is rather too long for a real-time
presence protocol.
Some other presence protocols solve this by requiring the client to send
a "noop" or "ping" command every few minutes, which the server must
respond to. Jabber doesn't seem to have anything equivalent. Am I
missing or misunderstanding something, or is this an issue with the
current Jabber protocol?
—Jens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1146 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20010406/64b500f2/attachment-0002.bin>
More information about the JDev
mailing list