Пример #1
0
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
Пример #2
0
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
Пример #3
0
Файл: sasl.py Проект: 2mf/pyicqt
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)
 def test_client(self):
     """
     L{jstrports.client} returns a L{TCPClient} service.
     """
     got = jstrports.client("tcp:DOMAIN:65535", "Factory")
     self.assertIsInstance(got, TCPClient)