[JDEV] OOB filetransfer negotiation

Thomas Charron tcharron at ductape.net
Sat Aug 11 16:57:19 CDT 2001


Quoting Jens Alfke <jens at mac.com>:
> On Saturday, August 11, 2001, at 01:06 AM, Sebastiaan 'CBAS' Deckers 
> wrote:
> > I'm trying to figure out how exactly file-transfers get negotiated.
> > WinJab seems to use an <iq> with namespace "jabber:iq:oob" containing
> > the
> > URL of the file.
> Oh boy, that's a new one to me! I keep finding more and more of these 
> secret protocol extensions. The "standard" way to transfer files, which
> I've implemented, is to send a <message> containing a jabber:x:oob 
> extension element -- this is documented in the JPO and JPG.

  Err, the mechansim is the same either way.  IQ messages contain namespace, 
message X tags contains messages.  Client developers can ise either extention.  
Hopefully, client developers will agree on a common way of 'doing it', but 
either way is 'acceptable' via the protocol.

> I just took at look at the jabber:iq:oob "spec". I don't really see why
> someone decided to re-invent this in a different form. Surely the 
> accept/refuse feedback could have been implemented just as well using 
> reply <message>s?

  Well, yes, but not enforced by the protocol.  On the other hand, an IQ should 
ALWAYS have a 'result'.

> I've actually implemented a significant number of extensions to the 
> defined jabber:x:oob in my client, mostly to help the receiver display
> meaningful information about the file transfer before it begins. I've 
> added attributes to the <url> element that identify various metadata 
> about the transfer (is it a file vs. a directory? What is its size? What
> POSIX or HFS metadata does it have?) Of course this isn't known to be 
> accurate, but it lets the receiver display various info to the user 
> (including an icon) and it can be re-verified after the actual file is
> downloaded.

  So long as your not just addhock adding things to the tags, you're all set.  
If you DO, then you end 'exbracing and extending' the protocol, without working 
with other client developers, then you end up with many clients having 
imcompatible extentions, etc..

  The reason why *BOTH* way of doing oob messages is listed under 'standards' 
is to allow clients to choose either way to handle it.  Using iq also allows 
for server involvement, allows things such as PASS componenets to be used to 
assist in file transfers..

--- 
Thomas Charron
<< Wanted: One decent sig >>
<< Preferably litle used  >>



More information about the JDev mailing list