[PyXMPP] Custom protocol: message- or IQ-based?
cyberco at media2b.net
Sun Feb 18 20:55:02 CET 2007
I'd like to implement a client-to-client messaging protocol on top of
PyXMPP, but I wonder if I should use standard messages, or IQ packets. The
content of my protocol will be YAML. I tried using IQ packets, but didn't
get it working. I was able to send out valid IQ packets, but always got an
iq = Iq(from_jid=fromJid, to_jid=toJid, stanza_type='get')
queryNode = iq.new_query(ns_uri='http://www.company.com/app')
yamlNode = libxml2.newNode('yaml')
This results in the following IQ packet:
<iq from="x at x.com/home" to="y at y.com" type="get" id="979308"><query xmlns="
and the following error:
I wonder if the namespace is the problem. Can I just use any namespace as
long as both clients know it?
A disadvantage seems to be that IQ packets are not stored if the other is
offline. Any other disadvantages?
Thanks for any advice.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyXMPP