On Mon Jun 19 08:15:40 2006, Sergei Golovan wrote:
On 6/19/06, Michal vorner Vaner <[EMAIL PROTECTED]> wrote:
On Sun, Jun 18, 2006 at 10:47:19PM -0700, [EMAIL PROTECTED] wrote: > Given that the protocol itself does not seem to have a defined keep-alive > element, what is the recommended way for a client to keep its connection
>    alive to a XMPP server ?

Since XML allows any number of whitespace between elements that is just
ignored, you can send a whitespace if you are not in the middle of
stanza. It will do, NATs and other beasts will see data flowing,

The problem is that this "ping" is not a ping at all because it only
sends data and does not expect reply.

So, some NATs and proxies still break connection if they don't see
bidirectional flow.


Could you tell me which NATs do this? I'm unaware of any that handle timeouts differently for unidirectional data flows.


Another issue is that with this "ping" you can't control the
connection. If TCP connection breaks (but before TCP timeout reaches -
and it is a quite long timeout)

As far as I'm aware, there *is* no timeout on silent TCP connections.

 both messages and "pings" goes to
black hole and there's no way to work around this (to set some short
internal timeout or whatever).

True, you need some acking mechanism to prevent this.

Dave.
--
Dave Cridland - mailto:[EMAIL PROTECTED] - xmpp:[EMAIL PROTECTED]
 - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
 - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade

Reply via email to