本文整理匯總了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)