From 05c9ea5c1d953637343c9fad07267e7f89b20561 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Mon, 31 Aug 2009 22:46:31 +0000 Subject: * 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. --- sleekxmpp/component_example.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sleekxmpp/component_example.py') 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') -- cgit v1.2.3