Title:
There's nothing special about that sequence.  My JabberBot, for instance, sends a single \r every 30 seconds to keep its connection with the server alive.  You could probably only send the "stay awake" reminder every few minutes and still get away with it.  I agree the TCP keepalive on the server might be more elegant, but this is easier.
 
 
Todd.
 
-----Original Message-----
From: Jens Alfke [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 09, 2001 11:45 AM
To: [EMAIL PROTECTED]
Subject: Re: [JDEV] Detecting client/server disconnect?


On Friday, April 6, 2001, at 03:40 PM, Oliver Jones wrote:


Winjab works around this problem. It sends, once a minute, the five byte no-op message

space space tab space space

to the server. This keeps the flow open. In xml terms, this message is formally a noop; very cool.


This is a clever hack! Is there something magic about "space space tab space space" or would any whitespace sequence work?


On the other hand, using TCP keepalive seems more efficient, since responding to pings would involve only the TCP stack on the server and not the Jabber server process itself. If you imagine a server with 10,000 simultaneous connections, there are going to be 167 of these pings a second, so efficiency becomes important...


�Jens

Reply via email to