Jump to content

protocol question(s)


joe_schmo
 Share

Recommended Posts

 For fun I thought I would try and write a BitTorrent client, I am writing it in Java.  I have familiarized myself with the BitTorrent protocol and I have successfully, using a torrent file, gotten a list of peers from tracker(s), I have successfully completed a handshake, sent an interested message, receive the Unchoke message, downloaded pieces from a peer and validated the pieces with the hashed value in the torrent file.  Although I have not downloaded a complete torrent I have downloaded complete files within the torrent, small text files. 

What I cannot do, so far, is get the metadata from another peer, ie use a magnetic link to download torrents.  I have read http://www.bittorrent.org/beps/bep_0009.html and I believe I am seding the correct information to request the data.  When I sniff the communication using Wireshark I see that after I send the request the client closes the connection, ie FIN,ACK or RST, ACK, I have seen both.   I have sniffed to see what happens when uTorrent downloads the metadata and tried to mimic those calls but this does not work for me either.  

Does anyone have any suggestions?

 

Also, is there documentation somewhere that I can tell what all the messages sent mean?

00 00 00 03 14 03 00

I know this message is 3 bytes long, it is an extended message, type 20 but I don't know what the other 2 bytes mean.  Also I see this as well

00 00 00 01 0f

Don't know what this means either.

I would appreciate any help.

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...