def __init__(self, host, port, jid, password): self.host = host self.port = port factory = component.componentFactory(jid, password) StreamManager.__init__(self, factory)
def __init__(self, jid, password, host=None, port=5222): self.domain = jid.host self.host = host self.port = port factory = HybridClientFactory(jid, password) StreamManager.__init__(self, factory)
def __init__(self, jid, password, host=None, port=5222): self.jid = jid self.domain = generic.prepareIDNName(jid.host) self.host = host self.port = port factory = HybridClientFactory(jid, password) StreamManager.__init__(self, factory)
def __init__(self, jid, password, host=None, port=5222, requireTLS=True): self.jid = jid self.domain = jid.host.encode('idna') self.host = host self.port = port factory = HybridClientFactory(jid, password, requireTLS) StreamManager.__init__(self, factory)
def __init__(self, reactor=None): class DummyFactory(object): def addBootstrap(self, event, fn): pass factory = DummyFactory() StreamManager.__init__(self, factory, reactor) self.stub = XmlStreamStub() self._connected(self.stub.xmlstream) self._authd(self.stub.xmlstream)
def __init__(self, host, port, domain, password, extra_handlers=[]): self.host = host self.port = port self._state = None factory = component.componentFactory(domain, password) StreamManager.__init__(self, factory) for handler in extra_handlers: handler.setHandlerParent(self) self._state = u'connecting' zr = getUtility(IZopeReactor) zr.reactor.callFromThread(self.connect)
def __init__(self, jid, password, extra_handlers=[], host='localhost', port=5222): jid.resource = randomResource() self.jid = jid self.domain = jid.host self.host = host self.port = port self._state = None self._connector = None factory = client.HybridClientFactory(jid, password) # Setup StreamManager StreamManager.__init__(self, factory) for handler in extra_handlers: handler.setHandlerParent(self) self._state = u'connecting' zr = getUtility(IZopeReactor) zr.reactor.callFromThread(self.connect)