简体   繁体   中英

Libtorrent, Python, how set download speed

有什么办法可以从Python的libtorrent库中更改下载速度?

You can't "set" the download speed, however you can limit it. This can be done by using
torrent_handle::set_download_limit(int limit)

in python:

h = ses.add_torrent(info, "tmp")
h.set_download_limit(2048)

will limit your download speed to 2kB/s

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM