mafintosh / torrent-stream

The low level streaming torrent engine that peerflix uses
MIT License
1.94k stars 227 forks source link

confusing code?? #169

Closed wjianwei126 closed 8 years ago

wjianwei126 commented 8 years ago

it seems the code in exchangemeta.js is not doing anything meaningful

for (var i = 0; i * METADATA_BLOCK_SIZE < size; i++) { if (metadataPieces[i]) continue wire.extended(channel, {msg_type: 0, piece: i}) }

could someone elaberate on whats going on here? thanks

asapach commented 8 years ago

My guess is that it's requesting missing metadata pieces: http://www.bittorrent.org/beps/bep_0009.html

wjianwei126 commented 8 years ago

ur right ~ I got it thanks

amilajack commented 8 years ago

Should this issue be closed?