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


Python ClientFactory.clientConnectionLost方法代码示例

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


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

示例1: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ClientFactory import clientConnectionLost [as 别名]
 def clientConnectionLost(self, connector, unused_reason):
     self.clientProxy.nodeLocator.remove(self.address)
     if hasattr(self, 'deferred') and not self.deferred.called:
         self.reactor.callLater(0, self.deferred.errback, unused_reason)
         del self.deferred
     ClientFactory.clientConnectionLost(
             self, connector, unused_reason)
开发者ID:dpnova,项目名称:txmemcache,代码行数:9,代码来源:client.py

示例2: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ClientFactory import clientConnectionLost [as 别名]
 def clientConnectionLost(self, connector, reason):
     logger.info('lost connection: %s', reason.getErrorMessage())
     ClientFactory.clientConnectionLost(self, connector, reason)
     if self.reconnect:
         time.sleep(self.reconnect_delay)
         connector.connect()
     elif not self.protocols:
         if self.onFinish:
             self.onFinish.callback(None)
开发者ID:harnettlab,项目名称:sllurp,代码行数:11,代码来源:llrp.py

示例3: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ClientFactory import clientConnectionLost [as 别名]
    def clientConnectionLost(self, connector, reason):
        # Disable modules
        if connector.host in self.bot.moduleHandler.enabledModules:
            for module in self.bot.moduleHandler.enabledModules[connector.host]:
                self.bot.moduleHandler.disableModule(module, connector.host, True)

        self.bot.moduleHandler.runGenericAction("disconnect", connector.host)
        del self.bot.servers[connector.host]

        # Check whether or not we should reconnect
        if connector.host in self.currentlyDisconnecting:
            self.bot.log.info("Connection to {connector.host} was closed cleanly.", connector=connector)
            ClientFactory.clientConnectionLost(self, connector, reason)
            self.currentlyDisconnecting.remove(connector.host)
            self.bot.countConnections()
        else:
            ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
开发者ID:Heufneutje,项目名称:PyHeufyBot,代码行数:19,代码来源:factory.py

示例4: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ClientFactory import clientConnectionLost [as 别名]
 def clientConnectionFailed(self, connector, reason):
   log.msg('APNSFeedbackClientFactory clientConnectionFailed reason=%s' % reason)
   ClientFactory.clientConnectionLost(self, connector, reason)
开发者ID:B-Rich,项目名称:pyapns,代码行数:5,代码来源:server.py

示例5: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ClientFactory import clientConnectionLost [as 别名]
 def clientConnectionLost(self, connector, reason):
     log.msg('Lost connection.  Reason:', reason)
     ClientFactory.clientConnectionLost(self, connector, reason)
开发者ID:AndrewCvekl,项目名称:vumi,代码行数:5,代码来源:client.py

示例6: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ClientFactory import clientConnectionLost [as 别名]
 def clientConnectionLost(self, connector, reason):
     logger.debug("%s: BaseClient::clientConnectionLost(): %s",
                  self.protocol_name, reason)
     self.session = None
     return ClientFactory.clientConnectionLost(self, connector, reason)
开发者ID:da4089,项目名称:robot-nps,代码行数:7,代码来源:base.py

示例7: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ClientFactory import clientConnectionLost [as 别名]
 def clientConnectionLost(self, connector, reason):
     ClientFactory.clientConnectionLost(self, connector, reason)
开发者ID:kvj,项目名称:mp-twisted,代码行数:4,代码来源:clientconnection.py

示例8: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ClientFactory import clientConnectionLost [as 别名]
 def clientConnectionLost(self, connector, reason):
     ClientFactory.clientConnectionLost(self, connector, reason)
     del(self.connections[str(connector.host)])
开发者ID:fubendong,项目名称:pycoin,代码行数:5,代码来源:BitcoinProtocol.py

示例9: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ClientFactory import clientConnectionLost [as 别名]
 def clientConnectionLost(self, connector, reason):
     logger.info('lost connection: {}'.format(reason))
     ClientFactory.clientConnectionLost(self, connector, reason)
     if self.reconnect:
         reactor.callFromThread(time.sleep, self.reconnect_delay)
         connector.connect()
开发者ID:,项目名称:,代码行数:8,代码来源:

示例10: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ClientFactory import clientConnectionLost [as 别名]
 def clientConnectionLost(self, connector, reason):
     if hasattr(connector.transport, "fullDisconnect") and connector.transport.fullDisconnect:
         ClientFactory.clientConnectionLost(self, connector, reason)
     else:
         ReconnectingClientFactory.clientConnectionLost(self, connector, reason)
开发者ID:HubbeKing,项目名称:PyHeufyBot,代码行数:7,代码来源:factory.py

示例11: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ClientFactory import clientConnectionLost [as 别名]
 def clientConnectionLost(self, connector, reason):
     log.msg("APNSFeedbackClientFactory clientConnectionLost reason=%s" % reason)
     ClientFactory.clientConnectionLost(self, connector, reason)
开发者ID:jawj,项目名称:pyapns,代码行数:5,代码来源:server.py


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