def buildServiceManager(jid, password, strport): """ Constructs a pre-built C{component.ServiceManager}, using the specified strport string. """ svc = ServiceManager(jid, password) client_svc = jstrports.client(strport, svc.getFactory()) client_svc.setServiceParent(svc) return svc
def buildServiceManager(jid, password, strport): """ Constructs a pre-built L{ServiceManager}, using the specified strport string. """ svc = ServiceManager(jid, password) client_svc = jstrports.client(strport, svc.getFactory()) client_svc.setServiceParent(svc) return svc
def buildServiceManager(host, username, password, strport): """ Constructs a ServiceManager """ jid = internJID(username + '@' + host) svc = ServiceManager(jid, password) client_svc = jstrports.client(strport, svc.getFactory()) client_svc.setServiceParent(svc) return svc
def test_client(self): """ L{jstrports.client} returns a L{TCPClient} service. """ got = jstrports.client("tcp:DOMAIN:65535", "Factory") self.assertIsInstance(got, TCPClient)