本文整理汇总了Python中twisted.protocols.amp.AMP.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python AMP.__init__方法的具体用法?Python AMP.__init__怎么用?Python AMP.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类twisted.protocols.amp.AMP
的用法示例。
在下文中一共展示了AMP.__init__方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import __init__ [as 别名]
def __init__(self, agent):
"""
:param IConvergenceAgent agent: Convergence agent to notify of changes.
"""
locator = _AgentLocator(agent)
AMP.__init__(self, locator=locator)
self.agent = agent
示例2: __init__
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import __init__ [as 别名]
def __init__(self, *a, **kw):
AMP.__init__(self, *a, **kw)
self._producers = {}
self._consumers = {}
self._buffers = {}
self._pending = {}
self._waitingOnCompletion = {}
self._draining = set()
示例3: __init__
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import __init__ [as 别名]
def __init__(self, reactor, agent):
"""
:param IReactorTime reactor: A reactor to use to schedule periodic ping
[email protected]
:param IConvergenceAgent agent: Convergence agent to notify of changes.
"""
locator = _AgentLocator(agent, timeout_for_protocol(reactor, self))
AMP.__init__(self, locator=locator)
self.agent = agent
self._pinger = Pinger(reactor)
示例4: __init__
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import __init__ [as 别名]
def __init__(self, reactor, control_amp_service):
"""
:param reactor: See ``ControlServiceLocator.__init__``.
:param ControlAMPService control_amp_service: The service managing AMP
connections to the control service.
"""
locator = ControlServiceLocator(reactor, control_amp_service)
AMP.__init__(self, locator=locator)
self.control_amp_service = control_amp_service
self._pinger = Pinger(reactor)
示例5: __init__
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import __init__ [as 别名]
def __init__(self, reactor, agent):
"""
:param IReactorTime reactor: A reactor to use to schedule periodic ping
operations.
:param IConvergenceAgent agent: Convergence agent to notify of changes.
"""
locator = _AgentLocator(agent)
AMP.__init__(self, locator=locator)
self.agent = agent
self._pinger = Pinger(reactor)
示例6: __init__
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import __init__ [as 别名]
def __init__(self):
MultiplexingCommandLocator.__init__(self)
AMP.__init__(self)
示例7: __init__
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import __init__ [as 别名]
def __init__(self, isServer, startupD):
self.isServer = isServer
AMP.__init__(self)
self.startupD = startupD
示例8: __init__
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import __init__ [as 别名]
def __init__(self, avatarId):
AMP.__init__(self)
self.avatarId = avatarId
示例9: __init__
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import __init__ [as 别名]
def __init__(self, nexus):
AMP.__init__(self)
self.nexus = nexus
self.sentTransloads = []
示例10: __init__
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import __init__ [as 别名]
def __init__(self, identifier):
AMP.__init__(self)
self.identifier = identifier
self.finished = Deferred()
示例11: __init__
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import __init__ [as 别名]
def __init__(self, details, new_connection_callback, connection_lost_callback):
AMP.__init__(self)
self.details = details
self.new_connection_callback = new_connection_callback
self.connection_lost_callback = connection_lost_callback