本文整理汇总了Python中neubot.http.client.ClientHTTP.connect_uri方法的典型用法代码示例。如果您正苦于以下问题:Python ClientHTTP.connect_uri方法的具体用法?Python ClientHTTP.connect_uri怎么用?Python ClientHTTP.connect_uri使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类neubot.http.client.ClientHTTP
的用法示例。
在下文中一共展示了ClientHTTP.connect_uri方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: connect_uri
# 需要导入模块: from neubot.http.client import ClientHTTP [as 别名]
# 或者: from neubot.http.client.ClientHTTP import connect_uri [as 别名]
def connect_uri(self, uri=None, count=None):
if not uri:
uri = self.conf.get("speedtest.client.uri",
"http://neubot.blupixel.net/")
if not count:
count = self.conf.get("speedtest.client.nconn", 1)
LOG.info("* speedtest with %s" % uri)
ClientHTTP.connect_uri(self, uri, count)
示例2: connect_uri
# 需要导入模块: from neubot.http.client import ClientHTTP [as 别名]
# 或者: from neubot.http.client.ClientHTTP import connect_uri [as 别名]
def connect_uri(self, uri=None, count=None):
if not uri:
address = self.conf["bittorrent.address"]
port = self.conf["bittorrent.negotiate.port"]
uri = "http://%s:%s/" % (address, port)
LOG.start("BitTorrent: connecting to %s" % uri)
ClientHTTP.connect_uri(self, uri, 1)
示例3: connect_uri
# 需要导入模块: from neubot.http.client import ClientHTTP [as 别名]
# 或者: from neubot.http.client.ClientHTTP import connect_uri [as 别名]
def connect_uri(self, uri=None, count=None):
if not uri:
address = self.conf["bittorrent.address"]
port = self.conf["bittorrent.negotiate.port"]
uri = "http://%s:%s/" % (address, port)
logging.info("BitTorrent: connecting to %s in progress...", uri)
ClientHTTP.connect_uri(self, uri, 1)