mirror of
https://github.com/moparisthebest/xeps
synced 2024-12-21 15:18:51 -05:00
XEP-0198: Send 'a' element before stream closure
This commit is contained in:
commit
7047e9c5d1
14
xep-0198.xml
14
xep-0198.xml
@ -28,6 +28,12 @@
|
||||
&fabio;
|
||||
&dcridland;
|
||||
&mwild;
|
||||
<revision>
|
||||
<version>1.5.2</version>
|
||||
<date>2016-12-08</date>
|
||||
<initials>cs (XEP Editor: ssw)</initials>
|
||||
<remark><p>Send 'a' element before stream closure.</p></remark>
|
||||
</revision>
|
||||
<revision>
|
||||
<version>1.5.1</version>
|
||||
<date>2016-09-30</date>
|
||||
@ -306,12 +312,14 @@
|
||||
<a xmlns='urn:xmpp:sm:3' h='1'/>
|
||||
]]></example>
|
||||
<p>When an <r/> element ("request") is received, the recipient MUST acknowledge it by sending an <a/> element to the sender containing a value of 'h' that is equal to the number of stanzas handled by the recipient of the <r/> element. The response SHOULD be sent as soon as possible after receiving the <r/> element, and MUST NOT be withheld for any condition other than a timeout. For example, a client with a slow connection might want to collect many stanzas over a period of time before acking, and a server might want to throttle incoming stanzas. The sender does not need to wait for an ack to continue sending stanzas.</p>
|
||||
<p>Either party MAY send an <a/> element at any time (e.g., after it has received a certain number of stanzas, or after a certain period of time), even if it has not received an <r/> element from the other party.</p>
|
||||
<p>Either party MAY send an <a/> element at any time (e.g., after it has received a certain number of stanzas, or after a certain period of time), even if it has not received an <r/> element from the other party.
|
||||
It is RECOMMENDED that initiating entities (usually clients) send an <a/> element right before they gracefully close the stream, in order to inform the peer about received stanzas. Otherwise it can happen that stanzas are re-sent (usually by the server) although they were actually received.
|
||||
</p>
|
||||
<p>When a party receives an <a/> element, it SHOULD keep a record of the 'h' value returned as the sequence number of the last handled outbound stanza for the current stream (and discard the previous value).</p>
|
||||
<p>If a stream ends and it is not resumed within the time specified in the original <enabled/> element, the sequence number and any associated state MAY be discarded by both parties. Before the session state is discarded, implementations SHOULD take alternative action regarding any unhandled stanzas (i.e., stanzas sent after the most recent 'h' value received):</p>
|
||||
<ul>
|
||||
<li>A server SHOULD treat unacknowledged stanzas in the same way that it would treat a stanza sent to an unavailable resource, by either returning an error to the sender, delivery to an alternate resource, or committing the stanza to offline storage. (Note that servers SHOULD add a delay element with the original (failed) delivery timestamp, as per &xep0203;).</li>
|
||||
<li>A user-oriented client SHOULD try to silently resend the stanzas upon reconnection or inform the user of the failure via appropriate user-interface elements.</li>
|
||||
<li>A user-oriented client SHOULD try to silently resend the stanzas upon reconnection or inform the user of the failure via appropriate user-interface elements. Clients SHOULD also add a delay element with the original (failed) send timestamp, so that the original send date is preserved. Otherwise receiving clients could only display the reconnection timestamp of the sending client, which may confuse users.</li>
|
||||
</ul>
|
||||
<p>Because unacknowledged stanzas might have been received by the other party, resending them might result in duplicates; there is no way to prevent such a result in this protocol, although use of the XMPP 'id' attribute on all stanzas can at least assist the intended recipients in weeding out duplicate stanzas.</p>
|
||||
</section1>
|
||||
@ -646,7 +654,7 @@
|
||||
</xs:simpleType>
|
||||
|
||||
</xs:schema>
|
||||
]]></code>
|
||||
]]></code>
|
||||
</section1>
|
||||
|
||||
<section1 topic='Acknowledgements' anchor='ack'>
|
||||
|
Loading…
Reference in New Issue
Block a user