On 9 August 2013 13:30, Mark Macumber <
mark.m...@gmail.com> wrote:
> I saw that, I guess I was more asking about the client apps, but that
> depends on the client libraries. Im using Jabber.net and asmack for Android.
>
> I can also see a few options XEP-0065, XEP-0096, OOB or IIB?
>
> I would like some advice on the approaches to this if anyone has any?
I suggest posting your question to the jdev or standards lists over at
the XSF, where you'll reach client developers who have experience
implementing file transfer.
Unfortunately the internet being what it is (NATs and firewalls in
particular), sending a file directly to another person is not a
trivial task.
But there are only four basic XEPs you need to care about, at most.
Two are about negotiation, and two are about transports.
For an end-user IM client you want to start with XEP-0096 (older)
and/or XEP-0234 (newer). These describe how two clients can exchange
file transfer requests and find out the best transport to use between
them. Possible transports are for example XEP-0065 and XEP-0047.
XEP-0065 allows for direct connection between the clients when one or
both of the clients are not behind a NAT or firewall. It also allows
the clients to use a proxy on the server (if available) to get the
file through even if both clients are firewalled. This is mod_proxy65
in Prosody.
XEP-0047 is a hack which involves sending the file data over the XMPP
stream. It's practically guaranteed to always work if both clients
support it, and it's quite easy to implement. However...! It is
extremely inefficient, clogs up the XMPP stream, and the server may
rate limit you, making it very slow. You definitely don't want to send
a HD movie this way :) For really small files though (a handful of
KBs?), it's ok.
A good library will have all this implemented for you already!
Hope this helps.
Regards,
Matthew