本文整理汇总了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]
示例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})
示例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]
示例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)
示例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)
示例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})