[jdev] How is a client crash communicated to the XMPP server?

Peter Saint-Andre stpeter at stpeter.im
Tue Jun 3 10:19:08 CDT 2008


On 06/03/2008 1:15 AM, JabberForum wrote:
>>> If you want to tell when the client disconnects unexpectedly from
> another >>client (e.g. if you have a contact that represents your server
> availability or >>something) you could do something like:
> 
> Is there someway to figure out what happens at the server when a client
> crashes. Is any iq stanza sent to server (i doubt this would happen,
> because the client has crashed) or would the xmpp server come to know
> that by polling the status of the underlying tcp connection/socket?

If a client disconnects gracefully, it will send </stream:stream> and
close the TCP connection.

If a client disconnected ungracefully, it will send nothing, so the
server will need to poll the TCP connection periodically (if the
connection is idle); this is typically done using so-called "whitespace
pings" as described here:

http://www.xmpp.org/internet-drafts/draft-saintandre-rfc3920bis-05.html#streams-close-idle

Peter

-- 
Peter Saint-Andre
https://stpeter.im/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7338 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20080603/02e7044b/attachment-0002.bin>


More information about the JDev mailing list