>>> import concordance
>>> import concordance.extensions.ping
>>> s = concordance.Service('host')
>>> s.append(concordance.extensions.ping.Ping)
>>> import xml.etree.ElementTree as et
>>> st = et.fromstring('<iq from="arc@host" id="f00" to="host" type="get"><ping xmlns="urn:xmpp:ping" /></iq>')
>>> s.stream(st)
<iq from="host" id="f00" to="arc@host" type="result" />
>>>
That's a correct response to an XMPP Ping request, one of the simplest XMPP extensions. Many of these basic extensions will be combined into a single extension module and a ready-made Service class, this is just proof that it works.
No comments:
Post a Comment