mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-23 17:52:15 -05:00
XEP-0198: Fix text, <r/> element has no 'h' attribute
This commit is contained in:
parent
97d743a341
commit
e24ab378f9
@ -402,7 +402,7 @@ S: <failed xmlns='urn:xmpp:sm:3'>
|
||||
<li>As a client, send <enable/> with no attributes, and ignore the attributes on the <enabled/> response.</li>
|
||||
<li>As a server, ignore the attributes on the <enable/> element received, and respond via <enabled/> with no attributes.</li>
|
||||
<li>When receiving an <r/> element, immediately respond via an <a/> element where the value of 'h' returned is the sequence number of the last handled stanza.</li>
|
||||
<li>Keep an integer X for this stream session, initially set to zero. When about to send a stanza, first put the stanza (paired with the current value of X) in an "unacknowleged" queue. Then send the stanza over the wire with <r/> to request acknowledgement of that outbound stanza, and increment X by 1. When receiving an <r/> or <a/> element with an 'h' attribute, all stanzas whose paired value (X at the time of queueing) is less than or equal to the value of 'h' can be removed from the unacknowledged queue.</li>
|
||||
<li>Keep an integer X for this stream session, initially set to zero. When about to send a stanza, first put the stanza (paired with the current value of X) in an "unacknowleged" queue. Then send the stanza over the wire with <r/> to request acknowledgement of that outbound stanza, and increment X by 1. When receiving an <a/> element with an 'h' attribute, all stanzas whose paired value (X at the time of queueing) is less than or equal to the value of 'h' can be removed from the unacknowledged queue.</li>
|
||||
</ul>
|
||||
<p>This is enough of an implementation to minimally satisfy the peer, and allows basic tracking of each outbound stanza. If the stream connection is broken, the application has a queue of unacknowledged stanzas that it can choose to handle appropriately (e.g., warn a human user or silently send after reconnecting).</p>
|
||||
<p>The following examples illustrate basic acking (here the client automatically acks each stanza it has received from the server, without first being prompted via an <r/> element).</p>
|
||||
|
Loading…
Reference in New Issue
Block a user