1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-21 23:28:51 -05:00
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1765 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-04-18 16:20:38 +00:00
parent edfee330c8
commit 2e28fa6c36

View File

@ -22,6 +22,12 @@
<supersededby/> <supersededby/>
<shortname>NOT YET ASSIGNED</shortname> <shortname>NOT YET ASSIGNED</shortname>
&stpeter; &stpeter;
<revision>
<version>0.2</version>
<date>2008-03-20</date>
<initials>psa</initials>
<remark><p>Added transport negotiation scenario.</p></remark>
</revision>
<revision> <revision>
<version>0.1</version> <version>0.1</version>
<date>2008-03-05</date> <date>2008-03-05</date>
@ -150,7 +156,7 @@
to='kingclaudius@shakespeare.lit/castle' to='kingclaudius@shakespeare.lit/castle'
type='result'/> type='result'/>
]]></example> ]]></example>
<p>The receiver would then send a session-accept.</p> <p>The receiver would then sends a session-accept.</p>
<example caption="Receiver sends session-accept"><![CDATA[ <example caption="Receiver sends session-accept"><![CDATA[
<iq from='laertes@shakespeare.lit/castle' <iq from='laertes@shakespeare.lit/castle'
id='accept1' id='accept1'
@ -249,6 +255,125 @@
]]></example> ]]></example>
<p>The parties then attempt to use In-Band Bytestreams.</p> <p>The parties then attempt to use In-Band Bytestreams.</p>
</section2> </section2>
<section2 topic='Transport Selection' anchor='select'>
<p><cite>XEP-0096</cite> enable the initiator to offer more than one transport and for the receiving party to choose its desired transport. This flow can be emulated in Jingle negotiation as follows.</p>
<example caption="Initiator sends session-initiate with multiple transports"><![CDATA[
<iq from='kingclaudius@shakespeare.lit/castle'
id='jingle1'
to='laertes@shakespeare.lit/castle'
type='set'>
<jingle xmlns='urn:xmpp:tmp:jingle'
action='session-initiate'
initiator='kingclaudius@shakespeare.lit/castle'
sid='851ba2'>
<content creator='initiator' name='first-transport'>
<description xmlns='urn:xmpp:tmp:jingle:apps:file-transfer'>
<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:tmp:jingle:transports:bytestreams'/>
</content>
<content creator='initiator' name='second-transport'>
<description xmlns='urn:xmpp:tmp:jingle:apps:file-transfer'>
<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:tmp:jingle:transports:ibb'/>
</content>
</jingle>
</iq>
]]></example>
<p>The responder immediately acknowledges receipt of the session-initiate.</p>
<example caption="Responder acknowledges session-initiate"><![CDATA[
<iq from='laertes@shakespeare.lit/castle'
id='jingle1'
to='kingclaudius@shakespeare.lit/castle'
type='result'/>
]]></example>
<p>The receiver then sends a content-remove in order to choose the desired transport, which in this case is IBB.</p>
<example caption="Receiver sends content-remove"><![CDATA[
<iq from='laertes@shakespeare.lit/castle'
id='remove1'
to='kingclaudius@shakespeare.lit/castle'
type='set'>
<jingle xmlns='urn:xmpp:tmp:jingle'
action='content-remove'
initiator='kingclaudius@shakespeare.lit/castle'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='first-transport'>
<description xmlns='urn:xmpp:tmp:jingle:apps:file-transfer'>
<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:tmp:jingle:transports:bytestreams'/>
</content>
</jingle>
</iq>
]]></example>
<p>The initiator acknowledges the 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'/>
]]></example>
<p>The receiver then sends a session-accept.</p>
<example caption="Receiver sends session-accept"><![CDATA[
<iq from='laertes@shakespeare.lit/castle'
id='accept1'
to='kingclaudius@shakespeare.lit/castle'
type='set'>
<jingle xmlns='urn:xmpp:tmp:jingle'
action='session-accept'
initiator='kingclaudius@shakespeare.lit/castle'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='a-file-offer'>
<description xmlns='urn:xmpp:tmp:jingle:apps:file-transfer'>
<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:tmp:jingle:transports:bytestreams'/>
</content>
</jingle>
</iq>
]]></example>
<p>The initiator acknowledges the session-accept action.</p>
<example caption="Responder acknowledges session-accept"><![CDATA[
<iq from='laertes@shakespeare.lit/castle'
id='accept1'
to='kingclaudius@shakespeare.lit/castle'
type='result'/>
]]></example>
<p>Now the initiator sends the file using In-Band Bytestreams as defined in <cite>XEP-0047</cite>.</p>
</section2>
</section1> </section1>
<section1 topic='Implementation Notes' anchor='impl'> <section1 topic='Implementation Notes' anchor='impl'>