Expand description
BT Message Handler - Block request and receive logic
This module handles the low-level BitTorrent protocol message processing for block requests and data reception during piece download.
Extracted from bt_download_command.rs to improve modularity and
follow the single responsibility principle.
§Architecture Reference
Based on original aria2 C++ structure:
src/BtMessageDispatcher.h- Message dispatchingsrc/PeerInteractionCommand.h- Peer interaction
Structs§
- Block
Download Result - Result of a block download attempt
- BtMessage
Handler - BT Message Handler for block-level operations
Constants§
- BLOCK_
REQUEST_ TIMEOUT_ SECS - Timeout for each block request (seconds)
- BLOCK_
SIZE - Block size for each piece block request (16 KB)
- MAX_
BLOCK_ READ_ MESSAGES - Maximum messages to read while waiting for a specific block
- MAX_
RETRIES - Maximum number of retries for a failed piece download