1
我想限制我的下載/上傳速度在我的libtorrent客戶端。我爲此使用以下代碼。Libtorrent設置download_limit/upload_limit不起作用
params = { 'save_path': '.', \
'storage_mode': lt.storage_mode_t.storage_mode_sparse, \
'ti': info, 'flags': 0x020 }
h = ses.add_torrent(params)
h.set_download_limit(100)
h.set_upload_limit(100)
h.resume()
它應該以0.1 kb/sec的速度下載數據,但它仍然以1500 kb/sec左右的速度下載數據。
100.00% complete (down: 1576.0 kb/s up: 55.0 kB/s)
我失蹤了嗎?
您能否提供了Python語法。我無法找到任何東西。 –
我試過了,g = lt.ip_filter(),g.add_rule(「0.0.0.0」,「255.255.255.255」,0),然後啓動。句柄或lt.session()中沒有set_peer_class_filter方法。我試過ses.set_ip_filter(g),但仍然沒有成功。 –
我也試過ses.set_local_download_rate_limit(10000)。即使在這種情況下也沒有成功。 –