1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-24 10:12:19 -05:00
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@4065 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2010-03-11 04:30:11 +00:00
parent 657503efb6
commit ede8ba1dc7

View File

@ -26,10 +26,10 @@
&infiniti;
&stpeter;
<revision>
<version>1.3rc1</version>
<date>in progress, last updated 2010-02-17</date>
<version>1.3rc2</version>
<date>in progress, last updated 2010-03-10</date>
<initials>psa</initials>
<remark><p>Clarified error handling.</p></remark>
<remark><p>Clarified error handling and block construction.</p></remark>
</revision>
<revision>
<version>1.2</version>
@ -172,7 +172,7 @@
<section2 topic='Sending Data' anchor='send'>
<p>If the responder informs the initiator that it wishes to proceed with the session, the initiator can begin to send data over the bytestream (in addition, because the bytestream is bidirectional, the responder can also send data; see the <link url='#bidi'>Bidirectionality</link> section of this document for details).</p>
<p>Each chunk of data is contained in a &lt;data/&gt; element qualified by the 'http://jabber.org/protocol/ibb' namespace. The data element SHOULD be sent in an IQ stanza to enable proper tracking and throttling, but instead MAY be sent in a message stanza. The data to be sent, prior to any wrapping in the &lt;data/&gt; element and IQ or message stanza, MUST NOT be larger than the 'block-size' determined in the bytestream negotiation.</p>
<p>Each chunk of data is contained in a &lt;data/&gt; element qualified by the 'http://jabber.org/protocol/ibb' namespace. The data element SHOULD be sent in an IQ stanza to enable proper tracking and throttling, but instead MAY be sent in a message stanza. The base64-encoded data to be sent, prior to any wrapping in the &lt;data/&gt; element and IQ or message stanza, MUST NOT be larger than the 'block-size' determined in the bytestream negotiation.</p>
<example caption='Sending data in an IQ stanza'><![CDATA[
<iq from='romeo@montague.net/orchard'
id='kr91n475'
@ -187,7 +187,7 @@
</data>
</iq>
]]></example>
<p>Each chunk of data is included as the XML character data of the &lt;data/&gt; element after being encoded as Base64 as specified in Section 4 of &rfc4648;.</p>
<p>Each chunk of data is included as the XML character data of the &lt;data/&gt; element after being encoded as Base64 as specified in Section 4 of &rfc4648;. Each block MUST be a valid base64 block with padding at the end if needed.</p>
<p>The &lt;data/&gt; element MUST possess a 'seq' attribute; this is a 16-bit unsigned integer that acts as a counter for data chunks sent in a particular direction within this session. The 'seq' value starts at 0 (zero) for each sender and MUST be incremented for each packet sent by that entity. Thus, the second chunk sent has a 'seq' value of 1, the third chunk has a 'seq' value of 2, and so on. The counter loops at maximum, so that after value 65535 (2<span class='super'>15</span> - 1) the 'seq' MUST start again at 0.</p>
<p>The &lt;data/&gt; element MUST also possess a 'sid' attribute that ties the data chunk to this particular IBB session.</p>
<p>In the case of IQ stanzas, if the packet can be processed then the recipient MUST reply with an IQ stanza of type "result".</p>
@ -203,7 +203,7 @@
<li>Because the recipient has gone offline, the recipient's server returns a &recipient; error with a type of 'wait'.</li>
<li>Because a server-to-server link has gone down, the sender's server returns a &timeout; error with a type of 'wait'.</li>
</ol>
<p>Upon receiving an error related to delivery, the sender SHOULD temporarily suspend the stream but retry sending at a later time.</p>
<p>Upon receiving an error related to delivery of a &MESSAGE; or &IQ; stanza, the sender SHOULD temporarily suspend the stream but either (1) retry sending at a later time or (2) renegotiate the higher-level session (if any) such as a session controlled via &xep0234;.</p>
<p>It is also possible that there is a problem with the data packet itself, in which case the recipient shall return an appropriate error:</p>
<ol>
<li>Because the session ID is unknown, the recipient returns an &notfound; error with a type of 'cancel'.</li>