[JDEV] Detecting client/server disconnect?
Chuck Wegryzn
wegrzyn at garbagedump.com
Fri Apr 6 12:14:08 CDT 2001
Well I can't answer to how jabber detects outages, but I can comment on the SO_KEEPALIVE. You can program it to be any length of time (it's an ioctl).
Chuck Wegrzyn
----- Original Message -----
From: Jens Alfke
To: jdev at jabber.org
Sent: Friday, April 06, 2001 12:58 PM
Subject: [JDEV] Detecting client/server disconnect?
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 --------------
An HTML attachment was scrubbed...
URL: <https://www.jabber.org/jdev/attachments/20010406/4f01815d/attachment-0002.htm>
More information about the JDev
mailing list