[bittorrent] Proposed Extension to Peer Protocol

Adrian Ulrich torrent at blinkenlights.ch
Thu Nov 9 01:03:50 EST 2006


Hi Alan,

> Now, the problem is this. How do i fix my client if i don't know whats
> wrong? Ok, i can tool my code to log each message as it sends/receives, but
> that still leaves me with the problem of knowing what exactly was invalid.

But after completing the Handshake you'll know the PeerID (and software
it's running). So you could ask the Author of the Client or dig into the
sourcecode if the peer is running a Free/OpenSource client.

I don't think it's a good idea to add extensions that will only be
useful while developing a client (and to be honest: I haven't run into
the same problem yet while writing my own BT-client).
The extension would almost be useless in the 'real-world' because 95%
of all closed connections are caused by exiting the application or
timeouts.



> This message would be a standard peer message with a payload of a single int
> (or ushort if you want to conserve bandwidth). The error code in the message
> will link directly to a reason why the connection was terminated.

Uh, please no magical error-codes. Make it easy: Text strings are the
way to go :-) (Or maybe both, like SMTP / HTTP are doing it ...)


I think a generic 'Message' message would be much more useful:

<len=XX><id=Y><INT: type><INT: sequence><Message>


type == 0 could be 'system messages/errors' / type 1 could be abused
for Chatting between clients (-> sequence) and maybe type 2 could be
used for spamming ;-)


Regards,
 Adrian


-- 
            A. Top posters
            Q. What's the most annoying thing on Usenet?



More information about the BitTorrent mailing list