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