fetchBlock

suspend fun fetchBlock(piece: Int, offset: Int, length: Int): ByteArray

Fetch one BitTorrent block (length bytes at (piece, offset)) from this web seed, issuing a ranged HTTP GET per file the block overlaps (rangesFor) and concatenating the bodies in order. Mirrors how web_peer_connection re-assembles incoming_payload fragments into a single block.

The returned array is exactly length bytes when the server honours every range; a misbehaving server is the caller's concern (libtorrent validates the Content-Range against the request in on_receive, web_peer_connection.cpp:949).