summaryrefslogtreecommitdiff
path: root/sleekxmpp/component_example.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2009-08-31 22:46:31 +0000
committerNathan Fritz <fritzy@netflint.net>2009-08-31 22:46:31 +0000
commit05c9ea5c1d953637343c9fad07267e7f89b20561 (patch)
treed4b0d432870bb195a4f14ec07ce889fcd080a357 /sleekxmpp/component_example.py
parent00d46ee2b0fe4c0d76525d284dcc7ed588e701af (diff)
downloadslixmpp-05c9ea5c1d953637343c9fad07267e7f89b20561.tar.gz
slixmpp-05c9ea5c1d953637343c9fad07267e7f89b20561.tar.bz2
slixmpp-05c9ea5c1d953637343c9fad07267e7f89b20561.tar.xz
slixmpp-05c9ea5c1d953637343c9fad07267e7f89b20561.zip
* converted sleekxmpp to Python 3.x
* sleekxmpp no longer spawns threads for callback handlers -- there are now two threads: one for handlers and one for reading. callback handlers can get results from the read queue directly with the "wait" handler which is used in .send() for the reply catching argument.
Diffstat (limited to 'sleekxmpp/component_example.py')
-rw-r--r--sleekxmpp/component_example.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sleekxmpp/component_example.py b/sleekxmpp/component_example.py
index 04802370..37b7e96e 100644
--- a/sleekxmpp/component_example.py
+++ b/sleekxmpp/component_example.py
@@ -6,14 +6,14 @@ import time
class Example(sleekxmpp.componentxmpp.ComponentXMPP):
def __init__(self, jid, password):
- sleekxmpp.componentxmpp.ComponentXMPP.__init__(self, jid, password, 'localhost', 5060)
+ sleekxmpp.componentxmpp.ComponentXMPP.__init__(self, jid, password, 'vm1', 5230)
self.add_event_handler("session_start", self.start)
self.add_event_handler("message", self.message)
def start(self, event):
#self.getRoster()
#self.sendPresence(pto='admin@tigase.netflint.net/sarkozy')
- self.sendPresence(pto='tigase.netflint.net')
+ #self.sendPresence(pto='tigase.netflint.net')
pass
def message(self, event):
@@ -30,7 +30,7 @@ if __name__ == '__main__':
opts,args = optp.parse_args()
logging.basicConfig(level=opts.loglevel, format='%(levelname)-8s %(message)s')
- xmpp = Example('component.server.tld', 'asdfasdf')
+ xmpp = Example('component.vm1', 'secreteating')
xmpp.registerPlugin('xep_0004')
xmpp.registerPlugin('xep_0030')
xmpp.registerPlugin('xep_0060')