本文整理匯總了Python中neubot.http.client.ClientHTTP.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python ClientHTTP.__init__方法的具體用法?Python ClientHTTP.__init__怎麽用?Python ClientHTTP.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類neubot.http.client.ClientHTTP
的用法示例。
在下文中一共展示了ClientHTTP.__init__方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from neubot.http.client import ClientHTTP [as 別名]
# 或者: from neubot.http.client.ClientHTTP import __init__ [as 別名]
def __init__(self, poller):
ClientHTTP.__init__(self, poller)
STATE.update("test_name", "speedtest")
self.child = None
self.streams = collections.deque()
self.finished = False
self.state = None
示例2: __init__
# 需要導入模塊: from neubot.http.client import ClientHTTP [as 別名]
# 或者: from neubot.http.client.ClientHTTP import __init__ [as 別名]
def __init__(self, ctx):
""" Download a file """
self.ctx = ctx
ClientHTTP.__init__(self, POLLER)
self.configure(CONFIG.copy())
logging.info("runner_dload: connecting to %s", self.ctx["uri"])
self.connect_uri(self.ctx["uri"])
示例3: __init__
# 需要導入模塊: from neubot.http.client import ClientHTTP [as 別名]
# 或者: from neubot.http.client.ClientHTTP import __init__ [as 別名]
def __init__(self, ctx):
''' Download a file '''
self.ctx = ctx
ClientHTTP.__init__(self, POLLER)
self.configure(CONFIG.copy())
logging.debug('runner_dload: GET %s', self.ctx['uri'])
self.connect_uri(self.ctx['uri'])
示例4: __init__
# 需要導入模塊: from neubot.http.client import ClientHTTP [as 別名]
# 或者: from neubot.http.client.ClientHTTP import __init__ [as 別名]
def __init__(self, poller):
ClientHTTP.__init__(self, poller)
STATE.update("test_latency", "---", publish=False)
STATE.update("test_download", "---", publish=False)
STATE.update("test_upload", "---", publish=False)
STATE.update("test_name", "bittorrent")
self.negotiating = True
self.http_stream = None
self.success = False
self.my_side = {}
示例5: __init__
# 需要導入模塊: from neubot.http.client import ClientHTTP [as 別名]
# 或者: from neubot.http.client.ClientHTTP import __init__ [as 別名]
def __init__(self, poller, parent, rates):
ClientHTTP.__init__(self, poller)
self.parent = parent
self.rates = rates
STATE.update("test_latency", "---", publish=False)
STATE.update("test_download", "---", publish=False)
STATE.update("test_upload", "N/A", publish=False)
STATE.update("test_progress", "0%", publish=False)
STATE.update("test_name", "dash", publish=False)
STATE.update("test")
self.iteration = 0
self.rate_kbit = 0
self.speed_kbit = 100
self.saved_ticks = 0.0
self.saved_cnt = 0
self.saved_times = 0
示例6: __init__
# 需要導入模塊: from neubot.http.client import ClientHTTP [as 別名]
# 或者: from neubot.http.client.ClientHTTP import __init__ [as 別名]
def __init__(self, poller):
ClientHTTP.__init__(self, poller)
STATE.update("test_latency", "---", publish=False)
STATE.update("test_download", "---", publish=False)
STATE.update("test_upload", "---", publish=False)
STATE.update("test_progress", "0%", publish=False)
STATE.update("test_name", "dash")
self.state = STATE_NEGOTIATE
self.stream = None
self.measurements = []
self.client = None
self.authorization = ""
self.real_address = ""
self.queue_pos = 0
self.unchoked = False
self.iterations = 0
示例7: __init__
# 需要導入模塊: from neubot.http.client import ClientHTTP [as 別名]
# 或者: from neubot.http.client.ClientHTTP import __init__ [as 別名]
def __init__(self, poller):
ClientHTTP.__init__(self, poller)
self.timestamp = 0
self.uri = ""
self.stop = False