git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2291 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-09-30 14:50:28 +00:00
parent 6f15ad8258
commit 14f0e3e144
1 changed files with 34 additions and 80 deletions

View File

@ -24,6 +24,12 @@
<supersededby/> <supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname> <shortname>NOT_YET_ASSIGNED</shortname>
&stpeter; &stpeter;
<revision>
<version>0.8</version>
<date>2008-09-30</date>
<initials>psa</initials>
<remark><p>Corrected fallback scenario to use transport-replace and transport-accept.</p></remark>
</revision>
<revision> <revision>
<version>0.7</version> <version>0.7</version>
<date>2008-09-25</date> <date>2008-09-25</date>
@ -411,7 +417,7 @@ Claudius Laertes
</file> </file>
</offer> </offer>
</description> </description>
<transport xmlns='urn:xmpp:jingle:transports:bytestreams:0'/> <transport xmlns='urn:xmpp:jingle:transports:ibb:0'/>
</content> </content>
</jingle> </jingle>
</iq> </iq>
@ -437,15 +443,11 @@ Claudius Laertes
|<----------------------------| |<----------------------------|
| [ SOCKS5 failure! ] | | [ SOCKS5 failure! ] |
|x---------------------------x| |x---------------------------x|
| content-add (IBB) | | transport-replace (IBB) |
|<----------------------------|
| ack |
|---------------------------->|
| content-accept |
|---------------------------->| |---------------------------->|
| ack | | ack |
|<----------------------------| |<----------------------------|
| content-remove (SOCK5) | | transport-accept |
|<----------------------------| |<----------------------------|
| ack | | ack |
|---------------------------->| |---------------------------->|
@ -455,7 +457,7 @@ Claudius Laertes
|<----------------------------| |<----------------------------|
| ack | | ack |
|---------------------------->| |---------------------------->|
| [ file transfer ] | | [ file transfer via IBB] |
|============================>| |============================>|
| terminate | | terminate |
|<----------------------------| |<----------------------------|
@ -530,98 +532,50 @@ Claudius Laertes
</error> </error>
</iq> </iq>
]]></example> ]]></example>
<p>At this point the file transfer has failed using SOCKS5 Bytestreams. However, all is not lost, because the parties can attempt to fall back to In-Band Bytestreams. Therefore the responder sends a content-add action including a transport of IBB and a <em>request</em> for the file originally offered (note the use of the &lt;request/&gt; element instead of the &lt;offer/&gt; element, since the responder wants the initiator to send the previously-offered file).</p> <p>At this point the file transfer has failed using SOCKS5 Bytestreams. However, all is not lost, because the parties can attempt to fall back to In-Band Bytestreams. Therefore the initiator sends a transport-replace action including a transport of IBB.</p>
<example caption="Responder adds IBB to session"><![CDATA[ <example caption="Initiator replaces transport with IBB"><![CDATA[
<iq from='laertes@shakespeare.lit/castle' <iq from='kingclaudius@shakespeare.lit/castle'
id='add1' id='add1'
to='kingclaudius@shakespeare.lit/castle' to='laertes@shakespeare.lit/castle'
type='set'> type='set'>
<jingle xmlns='urn:xmpp:jingle:0' <jingle xmlns='urn:xmpp:jingle:0'
action='content-add' action='transport-replace'
initiator='kingclaudius@shakespeare.lit/castle' initiator='kingclaudius@shakespeare.lit/castle'
sid='851ba2'> sid='851ba2'>
<content creator='responder' name='a-file-request'> <content creator='initiator' name='a-file-offer'>
<description xmlns='urn:xmpp:jingle:apps:file-transfer:0'>
<request>
<file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
hash='552da749930852c69ae5d2141d3766b1'
name='test.txt'/>
</request>
</description>
<transport xmlns='urn:xmpp:jingle:transports:ibb:0'/> <transport xmlns='urn:xmpp:jingle:transports:ibb:0'/>
</content> </content>
</jingle> </jingle>
</iq> </iq>
]]></example> ]]></example>
<p>The initiator then acknowledges the content-add action.</p> <p>The responder then acknowledges the transport-replace action.</p>
<example caption="Initiator acknowledges content-add"><![CDATA[ <example caption="Responder acknowledges transport-replace"><![CDATA[
<iq from='kingclaudius@shakespeare.lit/castle' <iq from='laertes@shakespeare.lit/castle'
id='add1' id='add1'
to='laertes@shakespeare.lit/castle' to='kingclaudius@shakespeare.lit/castle'
type='result'/> type='result'/>
]]></example> ]]></example>
<p>If the content definition is acceptable, the initiator then sends a content-accept action to the responder.</p> <p>If the transport replacement is acceptable, the responder then sends a transport-accept action to the initiator.</p>
<example caption="Initiator sends content-accept"><![CDATA[ <example caption="Responder sends transport-accept"><![CDATA[
<iq from='kingclaudius@shakespeare.lit/castle' <iq from='laertes@shakespeare.lit/castle'
id='accept2' id='accept2'
to='laertes@shakespeare.lit/castle' to='kingclaudius@shakespeare.lit/castle'
type='set'> type='set'>
<jingle xmlns='urn:xmpp:jingle:0' <jingle xmlns='urn:xmpp:jingle:0'
action='content-accept' action='transport-accept'
initiator='kingclaudius@shakespeare.lit/castle' initiator='kingclaudius@shakespeare.lit/castle'
sid='851ba2'> sid='851ba2'>
<content creator='responder' name='a-file-request'> <content creator='responder' name='a-file-request'>
<description xmlns='urn:xmpp:jingle:apps:file-transfer:0'>
<request>
<file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
hash='552da749930852c69ae5d2141d3766b1'
name='test.txt'/>
</request>
</description>
<transport xmlns='urn:xmpp:jingle:transports:ibb:0'/> <transport xmlns='urn:xmpp:jingle:transports:ibb:0'/>
</content> </content>
</jingle> </jingle>
</iq> </iq>
]]></example> ]]></example>
<p>The responder then acknowledges the content-accept action.</p> <p>The initiator then acknowledges the transport-accept action.</p>
<example caption="Responder acknowledges content-accept"><![CDATA[ <example caption="Initiator acknowledges transport-accept"><![CDATA[
<iq from='laertes@shakespeare.lit/castle' <iq from='kingclaudius@shakespeare.lit/castle'
id='accept2' id='accept2'
to='kingclaudius@shakespeare.lit/castle' to='laertes@shakespeare.lit/castle'
type='result'/>
]]></example>
<p>The responder then sends a Jingle content-remove (deleting SOCKS5 Bytestreams) in order to choose the desired transport, which in this case is IBB.</p>
<example caption="Responder sends content-remove"><![CDATA[
<iq from='laertes@shakespeare.lit/castle'
id='remove1'
to='kingclaudius@shakespeare.lit/castle'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
action='content-remove'
initiator='kingclaudius@shakespeare.lit/castle'
sid='851ba2'>
<content creator='initiator' name='first-transport'>
<description xmlns='urn:xmpp:jingle:apps:file-transfer:0'>
<offer>
<file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
name='test.txt'
size='1022'
hash='552da749930852c69ae5d2141d3766b1'
date='1969-07-21T02:56:15Z'>
<desc>This is a test. If this were a real file...</desc>
</file>
</offer>
</description>
<transport xmlns='urn:xmpp:jingle:transports:bytestreams:0'/>
</content>
</jingle>
</iq>
]]></example>
<p>The initiator acknowledges receipt of the Jingle content-remove action.</p>
<example caption="Responder acknowledges content-remove"><![CDATA[
<iq from='laertes@shakespeare.lit/castle'
id='remove1'
to='kingclaudius@shakespeare.lit/castle'
type='result'/> type='result'/>
]]></example> ]]></example>
<p>The initiator then sends an IBB initiation request to the responder.</p> <p>The initiator then sends an IBB initiation request to the responder.</p>
@ -663,7 +617,7 @@ Claudius Laertes
</file> </file>
</offer> </offer>
</description> </description>
<transport xmlns='urn:xmpp:jingle:transports:bytestreams:0'/> <transport xmlns='urn:xmpp:jingle:transports:ibb:0'/>
</content> </content>
</jingle> </jingle>
</iq> </iq>
@ -716,24 +670,24 @@ Claudius Laertes
<application> <application>
<name>file-transfer</name> <name>file-transfer</name>
<desc>Jingle sessions for the transfer of a file</desc> <desc>Jingle sessions for the transfer of a file</desc>
<transport>reliable</transport> <transport>streaming</transport>
<doc>XEP-0234</doc> <doc>XEP-0234</doc>
</application> </application>
]]></code> ]]></code>
</section2> </section2>
<section2 topic='Jingle Transport Methods' anchor='registrar-transports'> <section2 topic='Jingle Transport Methods' anchor='registrar-transports'>
<p>The XMPP Registrar shall add to its registry of Jingle transport methods definitions for the reliable transport methods defined in <cite>XEP-0047</cite> and <cite>XEP-0065</cite>. The registry submissions are as follows:</p> <p>The XMPP Registrar shall add to its registry of Jingle transport methods definitions for the streaming transport methods defined in <cite>XEP-0047</cite> and <cite>XEP-0065</cite>. The registry submissions are as follows:</p>
<code><![CDATA[ <code><![CDATA[
<transport> <transport>
<name>bytestreams</name> <name>bytestreams</name>
<desc>A method for exchanging data over SOCKS5 Bytestreams.</desc> <desc>A method for exchanging data over SOCKS5 Bytestreams.</desc>
<type>reliable</type> <type>streaming</type>
<doc>XEP-0065</doc> <doc>XEP-0065</doc>
</transport> </transport>
<transport> <transport>
<name>ibb</name> <name>ibb</name>
<desc>A method for exchanging data over In-Band Bytestreams.</desc> <desc>A method for exchanging data over In-Band Bytestreams.</desc>
<type>reliable</type> <type>streaming</type>
<doc>XEP-0047</doc> <doc>XEP-0047</doc>
</transport> </transport>
]]></code> ]]></code>