Changeset 7456 for dotorg/trunk

Show
Ignore:
Timestamp:
08/28/2007 05:19:08 PM (17 months ago)
Author:
arvid
Message:

fixed typo in 'announce_peer', added editor@… as contact at the end of the document, changed 'values' message content to conform to uTorrent

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dotorg/trunk/html/Draft_DHT_protocol.html

    r7266 r7456  
    305305querying node, and "info_hash" containing the infohash of the torrent. 
    306306If the queried node has peers for the infohash, they are returned in a 
    307 key "values" as a list with a single string containing "compact" format 
    308 peer information concatenated together. If the queried node has no 
     307key "values" as a list of strings. Each string containing "compact" format 
     308peer information for a single peer. If the queried node has no 
    309309peers for the infohash, a key "nodes" is returned containing the K 
    310310nodes in the queried nodes routing table closest to the infohash 
     
    313313announce_peer query.</p> 
    314314<p><code>arguments:  {"id"&nbsp;: "&lt;querying nodes id&gt;", "info_hash"&nbsp;: "&lt;20-byte infohash of target torrent&gt;"} 
    315  response: {"id"&nbsp;: "&lt;queried nodes id&gt;", "values"&nbsp;: ["&lt;compact peer info string&gt;"]} 
     315 response: {"id"&nbsp;: "&lt;queried nodes id&gt;", "values"&nbsp;: ["&lt;peer 1 info string&gt;", "&lt;peer 2 info string&gt;"]} 
    316316     or: {"id"&nbsp;: "&lt;queried nodes id&gt;", "nodes"&nbsp;: "&lt;compact node info&gt;"}</code></p> 
    317317<a name="example_packets_3"></a> 
     
    319319<p><code>get_peers Query = {'t':0, 'y':'q', 'q':'get_peers', 'a': {'id':'abcdefghij0123456789', 'info_hash':'mnopqrstuvwxyz123456'}} 
    320320bencoded = d1:ad2:id20:abcdefghij01234567899:info_hash20:mnopqrstuvwxyz123456e1:q9:get_peers1:ti0e1:y1:qe</code></p> 
    321 <p><code>Response with peers = {'t':0, 'y':'r', 'r': {'id':'abcdefghij0123456789', 'token':'aoeusnth', 'values': ['axje.uidhtnmbrl']}} 
    322 bencoded = d1:rd2:id20:abcdefghij01234567895:token8:aoeusnth6:valuesl15:axje.uidhtnmbrlee1:ti0e1:y1:re</code></p> 
     321<p><code>Response with peers = {'t':0, 'y':'r', 'r': {'id':'abcdefghij0123456789', 'token':'aoeusnth', 'values': ['axje.u', 'idhtnm']}} 
     322bencoded = d1:rd2:id20:abcdefghij01234567895:token8:aoeusnth6:valuesl6:axje.u6:idhtnmee1:ti0e1:y1:re</code></p> 
    323323<p><code>Response with closest nodes = {'t':0, 'y':'r', 'r': {'id':'abcdefghij0123456789', 'token':'aoeusnth', 'nodes': 'def456...'}} 
    324324bencoded = d1:rd2:id20:abcdefghij01234567895:nodes9:def456...5:token8:aoeusnthe1:ti0e1:y1:re</code></p> 
     
    338338<a name="example_packets_4"></a> 
    339339<h5>Example Packets</h5> 
    340 <p><code>announce_peers Query = {'t':0, 'y':'q', 'q':'announce_peers', 'a': {'id':'abcdefghij0123456789', 'info_hash':'mnopqrstuvwxyz123456', 'port'&nbsp;: 6881, 'token'&nbsp;: 'aoeusnth'}} 
     340<p><code>announce_peers Query = {'t':0, 'y':'q', 'q':'announce_peer', 'a': {'id':'abcdefghij0123456789', 'info_hash':'mnopqrstuvwxyz123456', 'port'&nbsp;: 6881, 'token'&nbsp;: 'aoeusnth'}} 
    341341bencoded = d1:ad2:id20:abcdefghij01234567899:info_hash20:<br /> 
    342 mnopqrstuvwxyz1234564:porti6881e5:token8:aoeusnthe1:q14:announce_peers1:ti0e1:y1:qe</code></p> 
     342mnopqrstuvwxyz1234564:porti6881e5:token8:aoeusnthe1:q13:announce_peer1:ti0e1:y1:qe</code></p> 
    343343<p><code>Response = {"t":"0", "y":"r", "r": {"id":"mnopqrstuvwxyz123456"}} 
    344344bencoded = d1:rd2:id20:mnopqrstuvwxyz123456e1:t1:01:y1:re</code></p> 
     345<p>Send questions, comments and corrections to editor@bittorrent.org</p> 
    345346<a name="Footnotes"></a> 
    346347<h3>Footnotes</h3>