Added a nr attribute to the chunk message element.

This commit is contained in:
unknown 2014-08-12 10:48:36 -04:00
parent eef60ad67b
commit 665a52c82c
1 changed files with 17 additions and 3 deletions

View File

@ -33,6 +33,14 @@
<jid>peter.waher@jabber.org</jid> <jid>peter.waher@jabber.org</jid>
<uri>http://www.linkedin.com/in/peterwaher</uri> <uri>http://www.linkedin.com/in/peterwaher</uri>
</author> </author>
<revision>
<version>0.3</version>
<date>2014-08-12</date>
<initials>pw</initials>
<remark>
<p>A sequence number have been added to chunks, to allow chunked service to work over servers that do not maintain message order.</p>
</remark>
</revision>
<revision> <revision>
<version>0.2</version> <version>0.2</version>
<date>2014-07-07</date> <date>2014-07-07</date>
@ -860,14 +868,14 @@ Host: clayster.com</text>
<message from='httpserver@clayster.com' <message from='httpserver@clayster.com'
to='httpclient@clayster.com/browser'> to='httpclient@clayster.com/browser'>
<chunk xmlns='urn:xmpp:http' streamid='Stream0001'>iVBORw0KGgoAAAANSUhEUgAAASwAAAGQCAYAA ...</chunk> <chunk xmlns='urn:xmpp:http' streamId='Stream0001' nr='0'>iVBORw0KGgoAAAANSUhEUgAAASwAAAGQCAYAA ...</chunk>
</message> </message>
... ...
<message from='httpserver@clayster.com' <message from='httpserver@clayster.com'
to='httpclient@clayster.com/browser'> to='httpclient@clayster.com/browser'>
<chunk xmlns='urn:xmpp:http' streamid='Stream0001' last='true'>... 2uPzi9u+tVWJd+e+y1AAAAABJRU5ErkJggg==</chunk> <chunk xmlns='urn:xmpp:http' streamId='Stream0001' nr='5' last='true'>... 2uPzi9u+tVWJd+e+y1AAAAABJRU5ErkJggg==</chunk>
</message>]]> </message>]]>
</example> </example>
<p> <p>
@ -882,6 +890,11 @@ Host: clayster.com</text>
and then by the HTTP over XMPP transport layer. When received by the client, it is first reassembled by the HTTP over XMPP layer on the client, and then by the HTTP over XMPP transport layer. When received by the client, it is first reassembled by the HTTP over XMPP layer on the client,
and then by the HTTP client who will read the original chunk size elements inserted into the content. More information about HTTP chunking, and then by the HTTP client who will read the original chunk size elements inserted into the content. More information about HTTP chunking,
can be found in <link url='http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1'>RDF2616 §3.6.1</link>. can be found in <link url='http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1'>RDF2616 §3.6.1</link>.
</p>
<p>
<strong>Note 3:</strong> In order to work over XMPP servers that do not maintain message order, a <strong>nr</strong> attribute is available on the
<strong>chunk</strong> element. The first chunk reports a <strong>nr</strong> of zero. Each succcessive chunk reports a <strong>nr</strong> that is
incremented by one. In this way, the receiver can make sure to order incoming chunks in the correct order.
</p> </p>
</section3> </section3>
<section3 topic='sipub'> <section3 topic='sipub'>
@ -1942,6 +1955,7 @@ Host: clayster.com</text>
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="xs:base64Binary"> <xs:extension base="xs:base64Binary">
<xs:attribute name="streamId" type="xs:string" use="required"/> <xs:attribute name="streamId" type="xs:string" use="required"/>
<xs:attribute name="nr" type="xs:nonNegativeInteger" use="required"/>
<xs:attribute name="last" type="xs:boolean" use="optional" default="false"/> <xs:attribute name="last" type="xs:boolean" use="optional" default="false"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>