[BitTorrent] peer protocol question

Justin Cormack justin at street-vision.com
Wed Jun 23 07:28:53 EDT 2004

Can someone help me here, as I think I am doing something a little wrong.

I am implementing the peer protocol now, and I am not quite sure how it
goes from reading the spec.

Everything up to and including handshake with the peer goes fine.

If I send nothing (not even bitfield), I get a bitfield from the peer
(which has all the file and is running the standard client), and then
I can keep the connection alive by pinging occasionally, and receive

If I write the bitfield, then nothing happens until I send a ping, when I
get disconnected. If I send interested the same happens.

Can someone give me an example of what a typical exchange should look like?



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70

Yahoo! Groups Links

<*> To visit your group on the web, go to:

<*> To unsubscribe from this group, send an email to:
     BitTorrent-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

More information about the BitTorrent mailing list