[Standards] [XEP-0234] Jingle File Transfer, Last Call and File Sharing
stpeter at stpeter.im
Tue Feb 27 22:37:19 UTC 2018
On 2/27/18 10:33 AM, Ruslan N. Marchenko wrote:
> Am Montag, den 26.02.2018, 19:21 -0700 schrieb Peter Saint-Andre:
>> The idea there was to allow multiple files to be sent in a session;
>> wouldn't close the session if you want to send more files, so you
>> send the <received/> element defined in §8.1 instead. IMHO a good
>> solution would be to always ("MUST") send <received/> upon receipt of
>> the complete file, and to always ("MUST") terminate the session with
>> <success/> after sending the last file. Yes, this means you'd send
>> <received/> and <success/> in a one-file session, but that doesn't
>> horrible and at least all the state transitions are explicitly
> That actually touches a point which is nagging me each time I'm looking
> into implementation. Who is responsible for closing the session?
> According to this  it is recommended that receiving party closes the
> session as soon as it receives complete file.
> But that doesn't leave the space for adding files into the session, as
> it relies on concurrency - eg whether receiving party receives (or
> actually processes) complete transfer sooner than 'content-add' stanza.
>  https://xmpp.org/extensions/xep-0234.html#sect-idm139904544184976
Actually, that says "Once all file content in the session has been
transfered, either party MAY acknowledge receipt of the received files";
note that "all file content" might include multiple files if XEP-0358
(Publishing Available Jingle Sessions) is used.
So unfortunately I think the answer is: "it depends".
If there is a single file involved, then the receiver can terminate the
session after it has received that single file.
But, what if the sender has advertised only a single file (in the Jingle
session-initiate message) yet has more to send? In that case, the ideal
flow would be:
(1) the receiver acknowledges receipt by sending a <received/> message
as in §8.1
(2) the initiator sends a Jingle content-add action as in §6.3
(3) the receiver acks the content-add request
(4) the initiator sends the next file
After the receiver acknowledges receipt of the last file in the session,
the initiator would terminate the session.
That is the "push" scenario. In the "pull" scenario (XEP-0358), it seems
best for the receiver to terminate the session.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 873 bytes
Desc: OpenPGP digital signature
More information about the Standards