[bittorrent] Proposed Extension to Peer Protocol

Alan McGovern alan.mcgovern at gmail.com
Wed Nov 8 13:36:42 EST 2006


Hi,

Basically, while writing my own .NET based library i've thought of a good
extension to the peer protocol. At the moment, for quite a number of
reasons, it's possible for a client i'm trying to connect to and download
off to just close the connection because ive done something wrong.

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.
It's not always easy to figure out what the root cause of the problem was.

Proposed new peer message: ErrorMessage
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. This
message will only be sent if a connection is going to be terminated due to
an error associated with the peer at the other end (such as peer B trying to
request a piece off Peer A that he doesn't have, or Peer B sending a HaveAll
message when Peer A doesn't support FastPeers etc). The error message will
be sent immediately to Peer B and the connection immediately closed (when
combined with fast peers, possibly send a reject request message first as
appropriate).

There would then be a table, written up as part of the specs, which would
provide a list of every valid errorcode and the reasons it would be issued.
This would make debugging problems much easier.

Thanks,
Alan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ibiblio.org/pipermail/bittorrent/attachments/20061108/8f4259b0/attachment.html 


More information about the BitTorrent mailing list