-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@3949 4b5297f7-1745-476d-ba37-a9c6900126ab
- Loading branch information
Peter Saint-Andre
committed
Feb 19, 2010
1 parent
8268ba6
commit d98c56e
Showing
1 changed file
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,12 @@ | |
<supersededby/> | ||
<shortname>NOT_YET_ASSIGNED</shortname> | ||
&stpeter; | ||
<revision> | ||
<version>0.11</version> | ||
<date>2010-02-19</date> | ||
<initials>psa</initials> | ||
<remark><p>Added session-info message and namespace for communicating the file hash.</p></remark> | ||
</revision> | ||
<revision> | ||
<version>0.10</version> | ||
<date>2010-02-11</date> | ||
|
@@ -207,6 +213,7 @@ Initiator Responder | |
</jingle> | ||
</iq> | ||
]]></example> | ||
<p class='box'>Note: Computing the hash of the file before sending it can slow down the process of file transfer, since the sending application needs to process the file twice. The sender might prefer to send the hash after the file transfer has begun, using a transport-info message as described under <link url='#hash'>Communicating the Hash</link>.</p> | ||
<p>The responder immediately acknowledges receipt of the Jingle session-initiate.</p> | ||
<example caption="Responder acknowledges session-initiate"><![CDATA[ | ||
<iq from='[email protected]/balcony' | ||
|
@@ -251,7 +258,7 @@ Initiator Responder | |
to='[email protected]/balcony' | ||
type='result'/> | ||
]]></example> | ||
<p>Now the parties exchange the file using SOCKS5 Bytestreams.</p> | ||
<p>Now the parties exchange the file using the negotiated transport (here, SOCKS5 Bytestreams).</p> | ||
<p>Once the transfer is completed, either party can terminate the Jingle session; preferably this is done by the entity that receives the file to ensure that the complete file (up to the advertised size) has been received.</p> | ||
<example caption="Receiver sends session-terminate"><![CDATA[ | ||
<iq from='[email protected]/balcony' | ||
|
@@ -270,6 +277,23 @@ Initiator Responder | |
<p>For a description of the transport fallback scenario (from SOCK5 Bytestreams to In-Band Bytestreams), refer to <cite>XEP-0260</cite>.</p> | ||
</section1> | ||
|
||
<section1 topic='Communicating the Hash' anchor='hash'> | ||
<p>At any time, the hosting entity can communicate the hash of the file to the receiving entity. This is done by sending a session-info message containing a <hash/> element qualified by the 'urn:xmpp:jingle:apps:file-transfer:info:1' namespace.</p> | ||
<example caption="Receiver sends session-terminate"><![CDATA[ | ||
<iq from='[email protected]/orchard' | ||
id='kqh401b5' | ||
to='[email protected]/balcony' | ||
type='set'> | ||
<jingle xmlns='urn:xmpp:jingle:1' | ||
action='session-info' | ||
initiator='[email protected]/orchard' | ||
sid='a73sjjvkla37jfea'> | ||
<hash xmlns='urn:xmpp:jingle:apps:file-transfer:info:1'>552da749930852c69ae5d2141d3766b1</hash> | ||
</jingle> | ||
</iq> | ||
]]></example> | ||
</section1> | ||
|
||
<section1 topic='Requesting a File' anchor='request'> | ||
<p>If the entity that hosts a file has advertised its existence (or if a previous file transfer attempt has failed and the receiver would like to initiate another attempt), the entity that wishes to receive the file can "pull" the file from the hosting entity. This is done by sending a Jingle session-initiate to the hosting entity, including a &DESCRIPTION; element qualified by the 'urn:xmpp:jingle:apps:file-transfer:1' namespace and containing a <request/> element that defines the requested file.</p> | ||
<example caption="Receiver requests hosted file"><![CDATA[ | ||
|
@@ -349,7 +373,8 @@ Initiator Responder | |
</section1> | ||
|
||
<section1 topic='XML Schema' anchor='schema'> | ||
<code><![CDATA[ | ||
<section2 topic='File Transfer' anchor='schema-ft'> | ||
<code><![CDATA[ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<xs:schema | ||
|
@@ -378,7 +403,27 @@ Initiator Responder | |
</xs:complexType> | ||
</xs:schema> | ||
]]></code> | ||
]]></code> | ||
</section2> | ||
<section2 topic='File Transfer Info' anchor='schema-info'> | ||
<code><![CDATA[ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<xs:schema | ||
xmlns:xs='http://www.w3.org/2001/XMLSchema' | ||
targetNamespace='urn:xmpp:jingle:apps:file-transfer:info:1' | ||
xmlns='urn:xmpp:jingle:apps:file-transfer:info:1' | ||
elementFormDefault='qualified'> | ||
<xs:element name='hash' type='xs:string'/> | ||
</xs:schema> | ||
]]></code> | ||
</section2> | ||
</section1> | ||
|
||
<section1 topic='Acknowledgements' anchor='ack'> | ||
<p>Thanks to Marcus Lundblad and Jiří Zárevúcky for their feedback.</p> | ||
</section1> | ||
|
||
</xep> |