[bittorrent] A few questions regarding extended messages and DHT

ntorrent.20.draza at spamgourmet.com ntorrent.20.draza at spamgourmet.com
Wed Oct 31 09:22:30 EDT 2007


> > While doing the handshake, the remote peer just tells you:
> > 
> >  #1 What eproto extensions it does support (everything 
> listed && != 0)
> >  #2 What Id the peer will use to SEND eproto messages to YOU
> > 
> > m => { ut_pex = 5 } just means that the peer will use an id 
> > of '5' to send ut_pex messages to you.
> > It does NOT mean that the peer is expecting ut_pex messages 
> > with an id of 5. You are free to choose (hardcode) your own
> > ids for messages that YOU send.
> 
> I spoke too soon... The latest uTorrent does just the reverse 
> of what you wrote above (even though your reasoning is 
> perfectly valid AFAICT).
> 
> So, uTorrent 1.7.5 sends me the id of the extension *I* sent 
> to it, and expects me to send to it the extension *it* sent to me.

Actually, re-re-reading the spec again, it seems that uTorrent is right,
though the wording of the spec is VERY subtle and one can easily miss the
real meaning:

>> The extension message IDs are the IDs used to send the extension messages
to the peer sending this handshake.
>> i.e. The IDs are local to this particular peer.

So uTorrent seems to be right. Extension message ids YOU send should be the
ones peer sent you in the handshake, and vice versa.

I think the spec needs to be reworded slightly to avoid potential for
confusion.

Drazen




More information about the BitTorrent mailing list