当前位置: 首页>>代码示例>>Python>>正文


Python SRVConnector.__init__方法代码示例

本文整理汇总了Python中twisted.names.srvconnect.SRVConnector.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python SRVConnector.__init__方法的具体用法?Python SRVConnector.__init__怎么用?Python SRVConnector.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在twisted.names.srvconnect.SRVConnector的用法示例。


在下文中一共展示了SRVConnector.__init__方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from twisted.names.srvconnect import SRVConnector [as 别名]
# 或者: from twisted.names.srvconnect.SRVConnector import __init__ [as 别名]
 def __init__(self, client_reactor, domain, factory):
     """ Init """
     SRVConnector.__init__(self, client_reactor, 'xmpp-client', domain, factory)
     if isinstance(domain, unicode):
         warnings.warn(
             "Domain argument to XMPPClientConnector should be bytes, "
             "not unicode",
             stacklevel=2)
         domain = domain.encode('ascii')
     self.timeout = [1,3]
开发者ID:cvogler,项目名称:punjab,代码行数:12,代码来源:session.py

示例2: __init__

# 需要导入模块: from twisted.names.srvconnect import SRVConnector [as 别名]
# 或者: from twisted.names.srvconnect.SRVConnector import __init__ [as 别名]
    def __init__(self, reactor, dn, factory,
                 overrides=None, bindAddress=None):
        if not isinstance(dn, distinguishedname.DistinguishedName):
            dn = distinguishedname.DistinguishedName(stringValue=dn)
        if overrides is None:
            overrides = {}
        self.override = self._findOverRide(dn, overrides)

        domain = dn.getDomainName() or ''
        SRVConnector.__init__(self, reactor,
                  'ldap', domain, factory,
                  connectFuncKwArgs={'bindAddress': bindAddress})
开发者ID:cwaldbieser,项目名称:ldaptor,代码行数:14,代码来源:ldapconnector.py

示例3: __init__

# 需要导入模块: from twisted.names.srvconnect import SRVConnector [as 别名]
# 或者: from twisted.names.srvconnect.SRVConnector import __init__ [as 别名]
 def __init__(self, client_reactor, domain, factory):
     """ Init """
     SRVConnector.__init__(self, client_reactor, 'xmpp-client', domain, factory)
     self.timeout = [1,3]
开发者ID:apostolelvis,项目名称:punjab,代码行数:6,代码来源:session.py

示例4: __init__

# 需要导入模块: from twisted.names.srvconnect import SRVConnector [as 别名]
# 或者: from twisted.names.srvconnect.SRVConnector import __init__ [as 别名]
 def __init__(self, reactor, domain, factory):
     SRVConnector.__init__(self, reactor, 'xmpp-client', domain, factory)
开发者ID:Ri0n,项目名称:Hermes,代码行数:4,代码来源:xmpp.py

示例5: __init__

# 需要导入模块: from twisted.names.srvconnect import SRVConnector [as 别名]
# 或者: from twisted.names.srvconnect.SRVConnector import __init__ [as 别名]
 def __init__(self, reactor, domain, factory, port=5222):
     self.port=port
     SRVConnector.__init__(self, reactor, 'xmpp-client', domain, factory)
开发者ID:BackupTheBerlios,项目名称:freq-dev-svn,代码行数:5,代码来源:twistedwrapper.py

示例6: __init__

# 需要导入模块: from twisted.names.srvconnect import SRVConnector [as 别名]
# 或者: from twisted.names.srvconnect.SRVConnector import __init__ [as 别名]
 def __init__(self, reactor, domain, factory, credentials, tls_reactor):
     self.tls_reactor = tls_reactor
     SRVConnector.__init__(self, reactor, 'xmpp-net', str(domain), factory,
         connectFuncName='connectTLS', connectFuncKwArgs={'credentials':credentials})
开发者ID:BillTheBest,项目名称:xmppserver,代码行数:6,代码来源:net.py


注:本文中的twisted.names.srvconnect.SRVConnector.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。