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


Python ReconnectingClientFactory.clientConnectionLost方法代码示例

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


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

示例1: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionLost [as 别名]
def clientConnectionLost(self, connector, reason):
        """
        Notify the connectionPool that we've lost our connection.
        """

        if self.connectionPool.shutdown_requested:
            # The reactor is stopping; don't reconnect
            return

        self.log.error("MemCache connection lost: {r}", r=reason)
        if self._protocolInstance is not None:
            self.connectionPool.clientBusy(self._protocolInstance)

        ReconnectingClientFactory.clientConnectionLost(
            self,
            connector,
            reason) 
开发者ID:apple,项目名称:ccs-calendarserver,代码行数:19,代码来源:memcachepool.py

示例2: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionLost [as 别名]
def clientConnectionLost(self, connector, reason):
        out.info("Connection lost with reason: " + str(reason))
        ReconnectingClientFactory.clientConnectionLost(self, connector, reason) 
开发者ID:ParadropLabs,项目名称:Paradrop,代码行数:5,代码来源:cxbr.py

示例3: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionLost [as 别名]
def clientConnectionLost(self, connector, reason):
        self.rtx.output('RTGW: Lost connection.  Reason: %s' % reason)
        ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
        self.rtx.gateway_connect(None) 
开发者ID:rstms,项目名称:txTrader,代码行数:6,代码来源:rtx.py

示例4: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionLost [as 别名]
def clientConnectionFailed(self, connector, reason):
            print '[-] Connection failed: ', reason.getErrorMessage()
            # Try to reconnect
            print '[*] Trying to reconnect. Please wait...'
            ReconnectingClientFactory.clientConnectionLost(self, connector, reason) 
开发者ID:opsdisk,项目名称:dnmapR,代码行数:7,代码来源:dnmapR_client.py

示例5: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionLost [as 别名]
def clientConnectionLost(self, connector, reason):
            print '[-] Connection lost. Reason: {0}'.format(reason.getErrorMessage())
            # Try to reconnect
            print '[*] Trying to reconnect in 10 secs. Please wait...'
            ReconnectingClientFactory.clientConnectionLost(self, connector, reason) 
开发者ID:opsdisk,项目名称:dnmapR,代码行数:7,代码来源:dnmapR_client.py

示例6: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionLost [as 别名]
def clientConnectionLost(self, connector, reason):
        log.warn('Lost connection. Reason {reason!r}:', reason=reason)
        ReconnectingClientFactory.clientConnectionLost(self, connector, reason) 
开发者ID:astrorafael,项目名称:twisted-mqtt,代码行数:5,代码来源:factory.py

示例7: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionLost [as 别名]
def clientConnectionLost(self, connector, reason):
        if not self.shuttingDown:
            self.log.error("Connection to APN server lost: {reason}", reason=reason)
            if reason.type == OpenSSL.SSL.Error:
                # If we're failing due to a certificate issue, stop retrying.
                self.log.error("Ensure APNS certificate is not expired")
                ReconnectingClientFactory.stopTrying(self)
        ReconnectingClientFactory.clientConnectionLost(self, connector, reason) 
开发者ID:apple,项目名称:ccs-calendarserver,代码行数:10,代码来源:applepush.py

示例8: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionLost [as 别名]
def clientConnectionLost(self, connector, reason):
        log.msg('Connection lost: %s' % (reason.value,))
        self.window.clear()
        self.window.addstr(0, 0, 'Connection lost: %s' % (reason.value,))
        self.window.refresh()
        ReconnectingClientFactory.clientConnectionLost(self, connector, reason) 
开发者ID:svpcom,项目名称:wifibroadcast,代码行数:8,代码来源:cli.py

示例9: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionLost [as 别名]
def clientConnectionLost(self, connector, reason):
        LOGGER.debug('Lost connection. Reason: %s', reason)
        self.emit('close', self._proto)

        if not self._proto or (self._proto and not self._proto._manual_disconnect):
            ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
        self._proto = None 
开发者ID:gramaziokohler,项目名称:roslibpy,代码行数:9,代码来源:comm_autobahn.py

示例10: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionLost [as 别名]
def clientConnectionLost(self, connector, reason, reconnecting=0):
        log.info('pb-client-connection-lost')
        pb.PBClientFactory.clientConnectionLost(self, connector, reason,
                                                reconnecting=1)
        ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
        log.info('pb-client-connection-lost-retrying') 
开发者ID:opencord,项目名称:voltha,代码行数:8,代码来源:maple_olt.py


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