[bittorrent] [Bittorrent] Peer Wire Protocol silly question...

Justin Cormack justin at street-vision.com
Tue Sep 20 07:43:58 EDT 2005

On Tue, 2005-09-20 at 13:36 +0200, Olaf van der Spek wrote:
> On 9/20/05, Justin Cormack <justin at street-vision.com> wrote:
> > There is no request bitfield - the peer should send it to you after the
> > handshake finishes. If not that means that the peer has no pieces. Is
> > the peer disconnecting? If so you have probably got an incorrect
> > handshake. If not the peer probably has no pieces. Try sending the
> > keepalive message (4 zero bytes) and see if you get that back from the
> > peer.
> Is sending a keep alive related to receiving one?

Thats a good question.

The spec says
Messages of length zero are keepalives, and ignored. Keepalives are
generally sent once every two minutes, but note that timeouts can be
done much more quickly when data is expected.

Which is rather vague. Ignored suggests that they are ignored. But the
implication is that you are using them to timeout somehow. If they are
just ignored they are pointless, as you could just use TCP keepalives.


More information about the BitTorrent mailing list