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)。即使在这种情况下也没有成功。 –