[ejabberd] exchanging binary msg payloads with ejabberd?

Konstantin Khomoutov flatworm at users.sourceforge.net
Thu Apr 30 19:25:59 MSD 2009

marc2112 wrote:

> Can you think of any way I could either create a module or utilize ejabberd
 > out of the box to exchange binary data between two processes?
 > Sure I could encode the payload using base64 or something but since
 > I will control both clients, I thought there might be a more 
efficient way.
I think you can't: ejabberd speaks XMPP, which uses XML exclusively as 
far as servers are concerned, and you can't embed arbitrary binary data 
to XML.

On the other hand, if you mostly want to use the server as a "meeting 
point" for your clients, but the clients can connect directly do each 
other, you could look at the "out-of-band" XMPP file transfer protocols 
(Stream Initiation/SOCKS5 bytestreams, XEP-0065).
This way, the clients would use the server for general communication and 
direct connections for transferring binary data.

More information about the ejabberd mailing list