diff --git a/xep-0234.xml b/xep-0234.xml
index 00cd70d2..a86fa351 100644
--- a/xep-0234.xml
+++ b/xep-0234.xml
@@ -4,14 +4,6 @@
%ents;
]>
-
-
-
Added multi-file use case; updated spec to reflect XEP-0260 and XEP-0261; added algorithm attribute from XEP-0096; increased namespace versions from 1 to 2. To overcome these drawbacks, this specification defines a file transfer negotiation method that meets the following requirements: Jingle file transfer is only as reliable as the transports on which it depends. In particular, SOCKS5 Bytestreams ("S5B") does not always result in NAT or firewall traversal. To work around that problem, this specification requires all implementations to support as a fallback mechanism In-Band Bytestreams ("IBB"), which usually results in a successful (if slow) file transfer. Note: It is likely that a future version of this specification will also recommend implementation of a Jingle transport method that emulates the IETF's ICE-TCP technology, which is currently a work in progress (see &ice-tcp;); however, a future Jingle ICE-TCP transport method is dependent on the outcome of IETF work in this area. This section provides a friendly introduction to Jingle file transfer. First, the party that wishes to initiate the file transfer determines the responder's capabilities (via &xep0030; or &xep0115;). Here we assume that the responder supports the following service discovery features: The initiator then sends a Jingle session-initiation request to a potential responder. The content-type of the request specifies two things: Note: All attributes of the <file/> element are defined in XEP-0096, not in this specification. Note: All attributes of the <file/> element are defined in XEP-0096, not in this specification. In this example, the initiator is <romeo@montague.lit>, the responder is <juliet@capulet.lit>, the application type is a file offer, and the transport method is jingle-s5b. The flow is as follows. The initiator then attempts to initiate a SOCKS5 Bytestream with the responder as described in XEP-0260 and XEP-0065. If the responder is able to connect to one of the streamhosts, it returns a Jingle session-accept (including only the JID of the streamhost to which it connected). The initiator then attempts to initiate a SOCKS5 Bytestream with the responder as described in XEP-0260 and XEP-0065. In the meantime, the responder returns a Jingle session-accept. In the session-accept message, the <file/> element MAY contain a <range/> element to indicate that the receiver also supports ranged transfers as described below under Ranged Transfers. Note: Inclusion of the <range/> child of the <file/> element indicates that the receiver also supports ranged transfers as described below under Ranged Transfers. The initiator acknowledges the Jingle session-accept. Once one client has successfully created a connection, it sends a <candidate-used/> element to the peer inside a Jingle transport-info message. If a client receives a candidate-used notification it SHOULD continue trying to connect to candidates sent by its peer if it has not tried all candidates with a higher priority than the one successfully used by the peer. The peer immediately acknowledges receipt. (See XEP-0260 for further details.) Now the parties exchange the file using the negotiated transport (here, SOCKS5 Bytestreams). 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. Once the transfer is completed, either party can acknowledge completion (see Sending Multiple Files) or 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. For a description of the transport fallback scenario (from SOCK5 Bytestreams to In-Band Bytestreams), refer to XEP-0260. For a description of the transport fallback scenario (from SOCKS5 Bytestreams to In-Band Bytestreams), refer to XEP-0260. At any time during the lifetime of the file transfer session, 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. The XML character data of this <hash/> element has the same meaning as the 'hash' attribute of the <file/> element qualified by the 'http://jabber.org/protocol/si/profile/file-transfer' namespace from XEP-0096; that is, it is a checksum of the file contents produced in accordance with the hashing function specified by the 'algo' attribute, which MUST be one of the functions listed in the &ianahashes;. For historical reasons and for backward-compatibility with XEP-0096, the 'algo' attribute defaults to a value of "md5".
-
-
-
- or |
+ |
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.
+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:2' namespace and containing a <request/> element that defines the requested file.
The parties would then complete a session negotiation flow similar to that outlined above for offering a file.
-Note: If the requesting entity knows the hash of the file, then it can include only that metadata in its request. If not, the requesting entity needs to include enough metadata to uniquely identify the file, such as the date, name, and size. For similar considerations, see &rfc5547;.
+Note: If the requesting entity knows the hash of the file, it can include only that metadata in its request. If not, the requesting entity needs to include enough metadata to uniquely identify the file, such as the date, name, and size. For similar considerations, see &rfc5547;.
Alternatively, the sender could initiate a new file transfer, indicating that it supports ranged transfers, and in the Jingle session-accept message the receiver could indicate that it wants the transfer to begin at the specified offset.
The initiator can send multiple files by including multiple <file/> elements in its session-initiate message.
+The parties would negotiate the file transfer session as previously described.
+After exchange of the first file, the recipient SHOULD send a Jingle session-info message indicating receipt of the complete file.
+The hosting entity SHOULD NOT wait for arrival of the <received/> acknowledgement before starting to send the next file in its list.
+After the recipient has received all of the files, it SHOULD send a final acknowledgement and then terminate the session.
+OPEN ISSUE: Provide a way for the hosting entity to add more files to the original "manifest"?
+Jingle file transfer uses only a few of the actions defined in XEP-0166. Jingle usage is summarized in the following table.
+Jingle file transfer uses only a few of the actions defined in XEP-0166. Jingle usage is summarized in the following table.
Action | @@ -424,7 +575,7 @@ Initiator Responder||
---|---|---|
session-info | -Communication of the file hash | +Communicating the file hash |
session-initiate | @@ -440,7 +591,7 @@ Initiator Responder||
transport-info | -Unused | +Used in SOCKS5 Bytestreams |
transport-reject | @@ -461,12 +612,12 @@ Initiator Responder