當前位置: 首頁>>代碼示例>>Python>>正文


Python ClientHTTP.connect_uri方法代碼示例

本文整理匯總了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)
開發者ID:ClaudioArtusio,項目名稱:neubot,代碼行數:10,代碼來源:client.py

示例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)
開發者ID:DavideAllavena,項目名稱:neubot,代碼行數:11,代碼來源:client.py

示例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)
開發者ID:felipebusnello,項目名稱:neubot,代碼行數:11,代碼來源:client.py


注:本文中的neubot.http.client.ClientHTTP.connect_uri方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。