On Thursday 19 March 2009 14:51:08 Fabio Forno wrote:
> Which is the value of having a <ping/> and a <pong/> stanza in
> addition to <a/> <r/> stanzas besides the ability of sending back and
> error condition saying that packets are being throttled?

It's also useful to ping the connection when there's otherwise no traffic.  Of 
course you could just use the ack packets with a sequence number for this, 
but having a separate <ping> element seemed cleaner.

> I'm asking 
> because I'm wondering if this is feasible, since when a connection is
> throttled packets are usually queue in a buffer before calling the xml
> parser and also pings aren't processed.

Indeed, which is why the original document said the server SHOULD respond to 
pings while throttling, not that it MUST.  However, maybe it's time to 
reevaluate how throttling should be done.

In order to ensure presence isn't stale, clients (and servers) are going to 
want to abandon the connection quickly if it appears dead.  I understand that 
not reading the socket is a very good way to throttle connections, but at the 
same time how is a client supposed to tell the difference between a throttled 
connection and a dead connection?  Maybe the server could send unsolicited 
pongs ("you're not dead!") while the receive channel is blocked?

-Justin

Reply via email to