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


Python ProtocolWrapper.connectionLost方法代码示例

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


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

示例1: connectionLost

# 需要导入模块: from twisted.protocols.policies import ProtocolWrapper [as 别名]
# 或者: from twisted.protocols.policies.ProtocolWrapper import connectionLost [as 别名]
 def connectionLost(self, reason):
     # type: (AnyStr) -> None
     # reason = [Failure instance: Traceback (failure with no
     # frames): <class 'twisted.internet.error.ConnectionDone'>:
     # Connection was closed cleanly. ] (<type 'instance'>)
     self.clear()
     ProtocolWrapper.connectionLost(self, reason)
开发者ID:appknox,项目名称:m2crypto,代码行数:9,代码来源:TwistedProtocolWrapper.py

示例2: connectionLost

# 需要导入模块: from twisted.protocols.policies import ProtocolWrapper [as 别名]
# 或者: from twisted.protocols.policies.ProtocolWrapper import connectionLost [as 别名]
 def connectionLost(self, reason):
     """
     Handle the possible repetition of calls to this method (due to either
     the underlying transport going away or due to an error at the TLS
     layer) and make sure the base implementation only gets invoked once.
     """
     if not self._lostTLSConnection:
         # Tell the TLS connection that it's not going to get any more data
         # and give it a chance to finish reading.
         self._tlsConnection.bio_shutdown()
         self._flushReceiveBIO()
         self._lostTLSConnection = True
     reason = self._reason or reason
     self._reason = None
     ProtocolWrapper.connectionLost(self, reason)
开发者ID:AmirKhooj,项目名称:VTK,代码行数:17,代码来源:tls.py

示例3: connectionLost

# 需要导入模块: from twisted.protocols.policies import ProtocolWrapper [as 别名]
# 或者: from twisted.protocols.policies.ProtocolWrapper import connectionLost [as 别名]
 def connectionLost(self, reason):
     if not self.connectionLostCalled:
         ProtocolWrapper.connectionLost(self, reason)
         self.connectionLostCalled = True
开发者ID:20after4,项目名称:Yaki,代码行数:6,代码来源:TLSTwistedProtocolWrapper.py

示例4: connectionLost

# 需要导入模块: from twisted.protocols.policies import ProtocolWrapper [as 别名]
# 或者: from twisted.protocols.policies.ProtocolWrapper import connectionLost [as 别名]
 def connectionLost(self, reason):
     if debug:
         print 'TwistedProtocolWrapper.connectionLost'
     self.clear()
     ProtocolWrapper.connectionLost(self, reason)
开发者ID:mikedougherty,项目名称:M2Crypto,代码行数:7,代码来源:TwistedProtocolWrapper.py


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