本文整理汇总了Python中twisted.protocols.amp.AMP.connectionLost方法的典型用法代码示例。如果您正苦于以下问题:Python AMP.connectionLost方法的具体用法?Python AMP.connectionLost怎么用?Python AMP.connectionLost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类twisted.protocols.amp.AMP
的用法示例。
在下文中一共展示了AMP.connectionLost方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: connectionLost
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import connectionLost [as 别名]
def connectionLost(self, reason):
for id, producer in self._producers.items():
consumer = self._consumers.get(id)
if consumer is None:
self._finishReceiving(id, reason)
else:
self._finishSending(id, reason)
AMP.connectionLost(self, reason)
示例2: connectionLost
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import connectionLost [as 别名]
def connectionLost(self, reason):
"""
If a login has happened, perform a logout.
"""
AMP.connectionLost(self, reason)
if self.logout is not None:
self.logout()
self.boxReceiver = self.logout = None
示例3: connectionLost
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import connectionLost [as 别名]
def connectionLost(self, reason):
"""
Inform the associated L{conncache.ConnectionCache} that this
protocol has been disconnected.
"""
self.nexus.conns.connectionLostForKey((endpoint.Q2QEndpoint(
self.nexus.svc,
self.nexus.addr,
self.transport.getQ2QPeer(),
PROTOCOL_NAME), None))
AMP.connectionLost(self, reason)
示例4: connectionLost
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import connectionLost [as 别名]
def connectionLost(self, reason):
AMP.connectionLost(self, reason)
self.agent.disconnected()
self._pinger.stop()
示例5: connectionLost
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import connectionLost [as 别名]
def connectionLost(self, reason):
AMP.connectionLost(self, reason)
self.agent.disconnected()
示例6: connectionLost
# 需要导入模块: from twisted.protocols.amp import AMP [as 别名]
# 或者: from twisted.protocols.amp.AMP import connectionLost [as 别名]
def connectionLost(self, reason):
self.connection_lost_callback(self)
return AMP.connectionLost(self, reason)