[jdev] Multiple IQ stanzas in one "socket read"

Bradley Stone bvstone at bvstools.com
Tue Aug 20 19:45:17 UTC 2013


Cool, that's what I expected, Kevin.  Just wanted to make sure.  Thanks!


Bradley V. Stone
BVSTools, Inc.
www.bvstools.com
www.erpgsdk.com


On Tue, Aug 20, 2013 at 2:44 PM, Kevin Smith <kevin at kismith.co.uk> wrote:

>
>
>
> On Tue, Aug 20, 2013 at 8:41 PM, Bradley Stone <bvstone at bvstools.com>wrote:
>
>> Hi, all.
>>
>> Quick question here.  I just ran into a situation where on a single read
>> from a socket my jabber application received two stanzas.   One was an IQ
>> (ping) and the second was a presence.
>>
>> Example:
>>
>> <iq from='jabber.org' to='user1' type='get' id='ping'><ping
>> xmlns='urn:xmpp:ping'/></iq><presence from='user2' to='user1'
>> type='unavailable'/>
>>
>> I hadn't programmed for this and now am making the appropriate changes,
>> but I have a couple questions since it appears to be normal (but rare) to
>> include multiple stanzas on one socket write on the server side.
>>
>> 1.  Can multiple IQ stanzas be sent at once?
>> 2.  Can multiple presence or message stanzas be sent at once?
>>
>
>
> Certainly. XMPP is asynchronous; you could receive stanzas at any time, in
> any quantity.
>
> Stanzas can also span several reads.
>
> /K
>
>
> _______________________________________________
> JDev mailing list
> Info: http://mail.jabber.org/mailman/listinfo/jdev
> Unsubscribe: JDev-unsubscribe at jabber.org
> _______________________________________________
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.jabber.org/jdev/attachments/20130820/1a97360a/attachment-0001.html>


More information about the JDev mailing list