Cherry在Python中使用Rasterbar libtorrent挑选同行 [英] Cherry pick peers using Rasterbar libtorrent in Python
本文介绍了Cherry在Python中使用Rasterbar libtorrent挑选同行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人知道是否有可能使用libtorrent挑选同行进行连接?也就是说,在跟踪器返回对等IP和端口的列表之后,根据某些已定义的标准,将仅与选定的少数IP和端口进行连接.
Does anyone know if it's possible to cherry pick peers to connect with using libtorrent? That is, after the tracker returns a list of peer IPs and ports, only a selected few will be connected with based on some defined criteria.
谢谢
推荐答案
,您可以使用 set_ip_filter().您可以使用 connect_peer()将对等项添加到集合中.这就是您拥有的所有控制权.硬编码从集合中按顺序连接到哪个对等方的优先级.
you can remove peers from the set using set_ip_filter(). you can add peers to the set by using connect_peer(). That's about all the control you have. The priority of which peers from the set to connect to in which order is hard coded.
这篇关于Cherry在Python中使用Rasterbar libtorrent挑选同行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文