[bittorrent] download piece

Igor Solovyov igor.solovyov at gmail.com
Tue Nov 15 15:56:58 EST 2011


Hi,

Short answer:  no :-)

If you look on
http://www.bittorrent.org/beps/bep_0003.html#the-possible-values-are ,
'bitfield' paragraph, you can see that you got not an error, but 1st
message - 'bitfield'. And docs states clear "Downloaders which don't have
anything yet may skip the 'bitfield' message".
In general, notice, that bittorrent protocol is not RPC-like one, where if
you made call, then you get accordant response.
In bittorrent you can send  several requests in one order and receive
responses (i.e. 'piece') in different order or even don't receive responses
at all.

Regards,
Igor.

On Mon, Nov 14, 2011 at 10:26 PM, Amir Almasi <amir.fireflame at gmail.com>wrote:

> Hi all,
> I have a problem with sending the messages after handshake
>
> Handshaking works properly and has been tested, also the peer does the
> handshake as well.
> The problem is, when I send the request message ( request:
> <len=0013><id=6><index><begin><length> ) the receive would be an error
> which is
>
> ( in binary -- <<0,0,0,138,5,255,186,255,255,255,255,255,255,255,
>
>  255,255,255,255,255,255,255,255,255,255,255,255,
>
>  255,255,255,255,255,255,255,255,255,255,255,255,
>
>  255,255,255,255,255,255,255,255,255,255,255,255,
>
>  255,255,255,255,255,255,255,255,255,255,255,255,
>
>  255,255,255,255,255,255,255,255,255,255,255,255,
>
>  255,255,255,255,255,255,255,255,255,255,255,255,
>
>  255,255,255,255,255,255,255,255,255,255,255,255,
>
>  255,255,255,255,255,255,255,255,255,255,255,255,
>
>  255,255,255,255,255,255,255,255,255,255,255,255,
>
>  255,255,255,255,255,255,255,255,255,255,255,255,
>
>  255,255,255,255,255,255,255,128,0,0,0,5,4,0,0,0,
>
>  13,0,0,0,5,4,0,0,0,9,0,0,0,5,4,0,0,0,15,0,0,0,1,1>> )
>
> Should I send the bitfield message at first even I have no peace to share?
>
> Regrads,
>
>
> _______________________________________________
> BitTorrent mailing list
> BitTorrent at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/bittorrent
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ibiblio.org/pipermail/bittorrent/attachments/20111115/5248118b/attachment.html 


More information about the BitTorrent mailing list