[英]Libtorrent How to set timeout?
我使用add_magnet_uri访问信息,但是有一些资源响应缓慢,我应该使用什么来设置总超时时间?
http://www.rasterbar.com/products/libtorrent/manual.html
:(我没有找到相关的设置
params = {
'save_path': '/home/sdht/data',
'storage_mode': lt.storage_mode_sparse(),
'paused': False,
'auto_managed': True,
'duplicate_is_error': True
}
handle = lt.add_magnet_uri(self.ses, link, params)
while (not handle.has_metadata()):
time.sleep(.1)
种子无法在libtorrent中下载没有超时。 您可以在torrent中查询添加时的时间戳,如果添加的时间足够长,但尚未完成,则可以将其删除。
加载一个空闲的torrent也没有太多成本,因此您可能想要添加所有要并行解析的文件。
另外,您可能需要小心地将它们全部设置为auto_managed:正确,因为那样,停滞的torrent可能会阻止启动新的torrent。 如果将auto_managed设置为False,则将全部强制启动。
地址: http : //www.rasterbar.com/products/libtorrent/manual.html#session-settings
sts.user_agent = "USA Global Download"
sts.tracker_completion_timeout = 5
sts.tracker_receive_timeout = 5
sts.stop_tracker_timeout = 5
sts.active_downloads = -1
sts.active_seeds = -1
sts.active_limit = -1
sts.auto_scrape_min_interval = 5
sts.udp_tracker_token_expiry = 120
sts.min_announce_interval = 1
sts.inactivity_timeout = 60
sts.connection_speed = 10
sts.allow_multiple_connections_per_ip = True
sts.max_out_request_queue = 128
sts.request_queue_size = 3
sts.use_read_cache = False
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.