network-protocols - Bittorrent 协议(protocol)如何处理数据 block ?

标签 network-protocols bittorrent

如何在 bittorrent 协议(protocol)中处理数据 block ?

当客户端想要下载时,例如Linux 发行版是跟踪器返回一个对等点列表,然后客户端连接到该对等点并从每个对等点请求 block ,还是跟踪器返回一个对等点列表和哪个对等点的信息有什么数据?

数据 block 在哪里管理或处理,例如我需要 chunk 5, 6, 10 而 peer 2 有 chunk 5, 7, 8。数据在哪里控制或管理?客户端是否从其他对等点请求数据 block ,然后对等点检查它是否有该数据 block 然后发送它,或者数据流如何工作?

谢谢

最佳答案

跟踪器提供对等点列表,然后对等点连接并交换 block 列表。

The peers exchange a BITFIELD message immediately after the initial handshake. The BITFIELD contains 1s for pieces the peer has and 0s for those it doesn’t have. When a peer receives the BITFIELD, if all the bits are set to 1, then the remote peer is a seed. This way peers can identify seeds easily.

(from http://web.archive.org/web/20041119150847/http://mnl.cs.stonybrook.edu/home/karthik/BitTorrent/Robustness_of_BT.doc)

关于network-protocols - Bittorrent 协议(protocol)如何处理数据 block ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3941199/

相关文章:

javascript - node.js 中的 UDP 跟踪器抓取意外返回零

network-protocols - 设置 ELM327 监听

performance - 衡量网络浏览器的带宽

networking - 嵌入式PIC微 Controller 通过互联网与服务器通信的最佳协议(protocol)?

python - DHT:BitTorrent vs kademlia vs clones (python)

c - 什么是好的开源 BitTorrent 库?

client-server - 半条命 2 多人游戏协议(protocol)如何运作?

networking - OSI 与 TCP/IP 网络的实际影响

c - 在单个进程中管理多个套接字(最多 50 个套接字)的最有效方法?

digital-signature - BitTorrent 测试用例因 libsodium 失败