當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。