Download a piece stage. Second last

I have one question about pipelining request:
“recommends having 5 requests pending at once, to avoid a delay between blocks being sent.”

Do you want me to open multiple socket to one peer or open multiple peer socket to download multiple blocks of a piece parallely?

This suggestion comes from http://bittorrent.org/bittorrentecon.pdf, and I think the important part is that a client should avoid downloading pieces serially one by one. When downloading serially, there’d be idle time in between requesting a piece and waiting to receive it.

This isn’t a problem as long as you’ve got multiple requests in parallel (so you aren’t “idle” at any point of time), and that would work regardless of whether you’re talking to the same peer or multiple ones - just that they need to have the required pieces available.

You are talking about downloading pieces parallely. I am asking if I can do the same thing for blocks.

Yep, you can! The goal is to just have your server not be idle and always be downloading (i.e. maintain the “transfer rate”).

I tried to connect multiple client to single peer. It was giving ECONRESET error. Now I am only downloading one piece at a time from a client.