XMPP pub sub setup and working
satish at driveu.in
satish at driveu.in
Sat Dec 12 08:09:04 EST 2015
I am using xmpppy python library to connect with XMPP server(ejabberd2) but unable to connect and actually don't have clarity on how to connect, authenticate and send a message to the server.
Please help me to make it working
If possible please provide some code snippet using XMPPPY.
This is what I have tried:
In [1]: from xmpp import Client
In [2]: cl = Client(server='176.9.18.111', 5280)
File "<ipython-input-2-ae974e3ec546>", line 1
cl = Client(server='176.9.18.111', 5280)
SyntaxError: non-keyword arg after keyword arg
In [3]: cl = Client(server='176.9.18.111', port =5280)
Invalid debugflag given: always
Invalid debugflag given: nodebuilder
DEBUG:
DEBUG: Debug created for /Users/gathole/.virtualenvs/driveu/lib/python2.7/site-packages/xmpp/client.py
DEBUG: flags defined: always,nodebuilder
In [4]: cl.connect()
DEBUG: socket start Plugging <xmpp.transports.TCPsocket instance at 0x1048c6ab8> into <xmpp.client.Client instance at 0x1048c6950>
DEBUG: socket warn An error occurred while looking up _xmpp-client._tcp.176.9.18.111
DEBUG: socket start Successfully connected to remote host ('176.9.18.111', 5280)
DEBUG: dispatcher start Plugging <xmpp.dispatcher.Dispatcher instance at 0x1048c6b00> into <xmpp.client.Client instance at 0x1048c6950>
DEBUG: dispatcher info Registering namespace "unknown"
DEBUG: dispatcher info Registering protocol "unknown" as <class 'xmpp.protocol.Protocol'>(unknown)
DEBUG: dispatcher info Registering protocol "default" as <class 'xmpp.protocol.Protocol'>(unknown)
DEBUG: dispatcher info Registering namespace "http://etherx.jabber.org/streams"
DEBUG: dispatcher info Registering protocol "unknown" as <class 'xmpp.protocol.Protocol'>(http://etherx.jabber.org/streams)
DEBUG: dispatcher info Registering protocol "default" as <class 'xmpp.protocol.Protocol'>(http://etherx.jabber.org/streams)
DEBUG: dispatcher info Registering namespace "jabber:client"
DEBUG: dispatcher info Registering protocol "unknown" as <class 'xmpp.protocol.Protocol'>(jabber:client)
DEBUG: dispatcher info Registering protocol "default" as <class 'xmpp.protocol.Protocol'>(jabber:client)
DEBUG: dispatcher info Registering protocol "iq" as <class 'xmpp.protocol.Iq'>(jabber:client)
DEBUG: dispatcher info Registering protocol "presence" as <class 'xmpp.protocol.Presence'>(jabber:client)
DEBUG: dispatcher info Registering protocol "message" as <class 'xmpp.protocol.Message'>(jabber:client)
DEBUG: dispatcher info Registering handler <bound method Dispatcher.streamErrorHandler of <xmpp.dispatcher.Dispatcher instance at 0x1048c6b00>> for "error" type-> ns->(http://etherx.jabber.org/streams)
DEBUG: dispatcher warn Registering protocol "error" as <class 'xmpp.protocol.Protocol'>(http://etherx.jabber.org/streams)
DEBUG: socket sent <?xml version='1.0'?>
<stream:stream xmlns="jabber:client" to="176.9.18.111" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" >
DEBUG: socket error Socket error while receiving data
DEBUG: client stop Disconnect detected
DEBUG: socket error Socket operation failed
Out[4]: ''
More information about the Python-list
mailing list