mirror of
https://github.com/moparisthebest/xeps
synced 2024-12-21 23:28:51 -05:00
1.3rc1
This commit is contained in:
parent
ec34729554
commit
79bb7b34c6
38
xep-0198.xml
38
xep-0198.xml
@ -11,6 +11,7 @@
|
||||
&LEGALNOTICE;
|
||||
<number>0198</number>
|
||||
<status>Draft</status>
|
||||
<interim/>
|
||||
<type>Standards Track</type>
|
||||
<sig>Standards</sig>
|
||||
<dependencies>
|
||||
@ -28,6 +29,12 @@
|
||||
&fabio;
|
||||
&dcridland;
|
||||
&mwild;
|
||||
<revision>
|
||||
<version>1.3rc1</version>
|
||||
<date>in progress, last updated 2011-04-20</date>
|
||||
<initials>psa/mw</initials>
|
||||
<remark><p>Corrected the value of 'h' in several examples; removed an extraneous 'stanzas' attribute from one example.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>1.2</version>
|
||||
<date>2011-03-02</date>
|
||||
@ -376,10 +383,8 @@ C: <iq id='ls72g593' type='get'>
|
||||
|
||||
C: <r xmlns='urn:xmpp:sm:3'/>
|
||||
]]></example>
|
||||
<p>The server immediately sends an <a/> element to acknowledge handling of the stanza and then returns the roster.</p>
|
||||
<example caption='Server acknowledges handling of client stanza and sends a stanza'><![CDATA[
|
||||
S: <a xmlns='urn:xmpp:sm:3' h='1'/>
|
||||
|
||||
<p>The server handles the client stanza (here returning the roster) and sends an <a/> element to acknowledge handling of the stanza.</p>
|
||||
<example caption='Server handles client stanza and acknowledges handling of client stanza'><![CDATA[
|
||||
S: <iq id='ls72g593' type='result'>
|
||||
<query xmlns='jabber:iq:roster'>
|
||||
<item jid='juliet@capulet.lit'/>
|
||||
@ -387,25 +392,26 @@ S: <iq id='ls72g593' type='result'>
|
||||
</query>
|
||||
</iq>
|
||||
|
||||
S: <a xmlns='urn:xmpp:sm:3' h='1'/>
|
||||
]]></example>
|
||||
<p>The client then acknowledges receipt of the server's stanza, sends initial presence, and immediately sends an <r/> element to request acknowledgement, incrementing by one its internal representation of how many stanzas have been handled by the server.</p>
|
||||
<example caption='Client sends a stanza and requests acknowledgement'><![CDATA[
|
||||
C: <a xmlns='urn:xmpp:sm:3' h='0'/>
|
||||
<p>The client then chooses to acknowledge receipt of the server's stanza (although here it is under no obligation to do so, since the server has not requested an ack), sends initial presence, and immediately sends an <r/> element to request acknowledgement, incrementing by one its internal representation of how many stanzas have been handled by the server.</p>
|
||||
<example caption='Client acks handling of first server stanza, sends a stanza, and requests acknowledgement'><![CDATA[
|
||||
C: <a xmlns='urn:xmpp:sm:3' h='1'/>
|
||||
|
||||
C: <presence/>
|
||||
|
||||
C: <r xmlns='urn:xmpp:sm:3'/>
|
||||
]]></example>
|
||||
<p>The server immediately sends an <a/> element to acknowledge handling of the stanza and then broadcasts the user's presence (including to the client itself as shown below).</p>
|
||||
<example caption='Server acknowledges handling of client stanza and sends a stanza'><![CDATA[
|
||||
<example caption='Server acks handling of second client stanza and sends a stanza'><![CDATA[
|
||||
S: <a xmlns='urn:xmpp:sm:3' h='2'/>
|
||||
|
||||
S: <presence from='romeo@montague.lit/orchard'
|
||||
to='romeo@montague.lit/orchard'/>
|
||||
]]></example>
|
||||
<p>The client then acks the server's second stanza and sends an outbound message followed by an <r/> element.</p>
|
||||
<example caption='Client sends a stanza and requests acknowledgement'><![CDATA[
|
||||
C: <a xmlns='urn:xmpp:sm:3' h='1'/>
|
||||
<example caption='Client acks receipt of second server stanza, sends a stanza, and requests acknowledgement'><![CDATA[
|
||||
C: <a xmlns='urn:xmpp:sm:3' h='2'/>
|
||||
|
||||
C: <message to='juliet@capulet.lit'>
|
||||
<body>ciao!</body>
|
||||
@ -413,32 +419,32 @@ C: <message to='juliet@capulet.lit'>
|
||||
|
||||
C: <r xmlns='urn:xmpp:sm:3'/>
|
||||
]]></example>
|
||||
<p>The server immediately sends an <a/> element to acknowledge handling of the stanza and then routes the stanza to the remote contact (not shown here because the server does not send a stanza to the client).</p>
|
||||
<example caption='Server acknowledges handling of the stanza'><![CDATA[
|
||||
<p>The server immediately sends an <a/> element to acknowledge handling of the third client stanza and then routes the stanza to the remote contact (not shown here because the server does not send a stanza to the client).</p>
|
||||
<example caption='Server acknowledges handling of third client stanza'><![CDATA[
|
||||
S: <a xmlns='urn:xmpp:sm:3' h='3'/>
|
||||
]]></example>
|
||||
<p>And so on.</p>
|
||||
</section2>
|
||||
|
||||
<section2 topic='Efficient Acking Scenario' anchor='scenarios-efficient'>
|
||||
<p>The basic acking scenario is wasteful because the client requested an ack for each stanza. A more efficient approach is to periodically request acks (e.g., every 5 stanzas) in accordance with the 'stanzas' attribute value provided by the receiving entity on the <enabled/> element. This is shown schematically in the following pseudo-XML.</p>
|
||||
<p>The basic acking scenario is wasteful because the client requested an ack for each stanza. A more efficient approach is to periodically request acks (e.g., every 5 stanzas). This is shown schematically in the following pseudo-XML.</p>
|
||||
<example caption='An efficient session'><![CDATA[
|
||||
C: <enable/>
|
||||
S: <enabled stanzas='5'/>
|
||||
S: <enabled>
|
||||
C: <message/>
|
||||
C: <message/>
|
||||
C: <message/>
|
||||
C: <message/>
|
||||
C: <message/>
|
||||
C: <r/>
|
||||
S: <a h='4'/>
|
||||
S: <a h='5'/>
|
||||
C: <message/>
|
||||
C: <message/>
|
||||
C: <message/>
|
||||
C: <message/>
|
||||
C: <message/>
|
||||
C: <r/>
|
||||
S: <a h='9'/>
|
||||
S: <a h='10'/>
|
||||
]]></example>
|
||||
<p>In particular, on mobile networks, it is advisable to only request and/or send acknowledgements when an entity has other data to send, or in lieu of a whitespace keepalive or XMPP ping (XEP-0199).</p>
|
||||
</section2>
|
||||
|
Loading…
Reference in New Issue
Block a user