コード例 #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
ファイル: component.py プロジェクト: galaxysd/BitTorrent
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
コード例 #4
0
 def test_client(self):
     """
     L{jstrports.client} returns a L{TCPClient} service.
     """
     got = jstrports.client("tcp:DOMAIN:65535", "Factory")
     self.assertIsInstance(got, TCPClient)
コード例 #5
0
 def test_client(self):
     """
     L{jstrports.client} returns a L{TCPClient} service.
     """
     got = jstrports.client("tcp:DOMAIN:65535", "Factory")
     self.assertIsInstance(got, TCPClient)