python - 使用 libtorrent (rasterbar) 获取上传事件警报

标签 python bittorrent libtorrent

我正在尝试获取有关我发送给对等方的数据的警报。我的代码通过查找 libtorrent.block_finished_alert 非常适合传入 block ,但我想知道我何时以及向同级发送了什么。我找不到可为我提供相应出站转账信息的提醒。我需要知道文件和偏移量(对等请求)。

是否有出站阻止请求警报?

我使用的是 python 绑定(bind),但 C++ 代码也很好。

最佳答案

最接近警报的可能是 stats_alert。它会告诉您上传的有效负载字节数。但它不会为您提供发送的完整 block 的粒度。

如果您想添加警报,请查看bt_peer_connection::write_piece

欢迎补丁!

关于python - 使用 libtorrent (rasterbar) 获取上传事件警报,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13919367/

相关文章:

python - 简单的线性搜索测试(python)

python - 创建新的种子和种子

c# - MonoTorrent 分发软件

ssl - boost::asio 无法仅接受 TLS 1.2?

python - 如何使用 python-libtorrent 下载特定文件

python - 在 django 模型中保存列表

python - 如何在运行时结束python程序?

python - 回归:如何逼近多维函数?

Bittorrent 跟踪器请求,info_hash 格式

bittorrent - BitTorrent 磁力链接如何工作?