On Sat Aug 6 11:11:54 2011, Alexander Holler wrote:
Am 20.07.2011 12:26, schrieb Dave Cridland:
On Wed Jul 20 04:34:29 2011, Mark Rejhon wrote:
So, does anyone recommend a standardized method of a sub-70-byte
keep
alive
<message> ?
NOPE!
XEP-0198 "Null acks" are good. Just send an <a/> even if you don't
need
anything new acked, and the peer responds with an <r/>. This
slides in
under the FACH limit nicely, especially with compression.
An <a/> doesn't trigger a response, the <r/> triggers an <a/>.
Indeed. But an unsolicited <a/> is equivalent to a whitespace ping,
except it'll trot further up the stack. An </r> causes a response,
but you can of course send either, depending on whether you're just
keeping the TCP session live, or actively probing it.
And don't forget the namespace. That adds additional 22 chars,
I hadn't. It's going to add a maximum of 22 chars, but if there's
compression, then at least the " xmlns='" is likely to collapse, and
more probably most, if not all, the namespace too.
Both <a/> and <r/> are likely to drop down to basically one token
after a very short period, and one token is (usually) a couple of
bytes of the compressed stream, including the block framing.
So without compression, you're likely to come in under FACH limits;
with, it's a near certainty.
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