Changeset 7456 for dotorg/trunk
- Timestamp:
- 08/28/2007 05:19:08 PM (17 months ago)
- Files:
-
- 1 modified
-
dotorg/trunk/html/Draft_DHT_protocol.html (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dotorg/trunk/html/Draft_DHT_protocol.html
r7266 r7456 305 305 querying node, and "info_hash" containing the infohash of the torrent. 306 306 If the queried node has peers for the infohash, they are returned in a 307 key "values" as a list with a singlestring containing "compact" format308 peer information concatenated together. If the queried node has no307 key "values" as a list of strings. Each string containing "compact" format 308 peer information for a single peer. If the queried node has no 309 309 peers for the infohash, a key "nodes" is returned containing the K 310 310 nodes in the queried nodes routing table closest to the infohash … … 313 313 announce_peer query.</p> 314 314 <p><code>arguments: {"id" : "<querying nodes id>", "info_hash" : "<20-byte infohash of target torrent>"} 315 response: {"id" : "<queried nodes id>", "values" : ["< compact peerinfo string>"]}315 response: {"id" : "<queried nodes id>", "values" : ["<peer 1 info string>", "<peer 2 info string>"]} 316 316 or: {"id" : "<queried nodes id>", "nodes" : "<compact node info>"}</code></p> 317 317 <a name="example_packets_3"></a> … … 319 319 <p><code>get_peers Query = {'t':0, 'y':'q', 'q':'get_peers', 'a': {'id':'abcdefghij0123456789', 'info_hash':'mnopqrstuvwxyz123456'}} 320 320 bencoded = 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.u idhtnmbrl']}}322 bencoded = d1:rd2:id20:abcdefghij01234567895:token8:aoeusnth6:valuesl 15: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']}} 322 bencoded = d1:rd2:id20:abcdefghij01234567895:token8:aoeusnth6:valuesl6:axje.u6:idhtnmee1:ti0e1:y1:re</code></p> 323 323 <p><code>Response with closest nodes = {'t':0, 'y':'r', 'r': {'id':'abcdefghij0123456789', 'token':'aoeusnth', 'nodes': 'def456...'}} 324 324 bencoded = d1:rd2:id20:abcdefghij01234567895:nodes9:def456...5:token8:aoeusnthe1:ti0e1:y1:re</code></p> … … 338 338 <a name="example_packets_4"></a> 339 339 <h5>Example Packets</h5> 340 <p><code>announce_peers Query = {'t':0, 'y':'q', 'q':'announce_peer s', 'a': {'id':'abcdefghij0123456789', 'info_hash':'mnopqrstuvwxyz123456', 'port' : 6881, 'token' : 'aoeusnth'}}340 <p><code>announce_peers Query = {'t':0, 'y':'q', 'q':'announce_peer', 'a': {'id':'abcdefghij0123456789', 'info_hash':'mnopqrstuvwxyz123456', 'port' : 6881, 'token' : 'aoeusnth'}} 341 341 bencoded = d1:ad2:id20:abcdefghij01234567899:info_hash20:<br /> 342 mnopqrstuvwxyz1234564:porti6881e5:token8:aoeusnthe1:q1 4:announce_peers1:ti0e1:y1:qe</code></p>342 mnopqrstuvwxyz1234564:porti6881e5:token8:aoeusnthe1:q13:announce_peer1:ti0e1:y1:qe</code></p> 343 343 <p><code>Response = {"t":"0", "y":"r", "r": {"id":"mnopqrstuvwxyz123456"}} 344 344 bencoded = d1:rd2:id20:mnopqrstuvwxyz123456e1:t1:01:y1:re</code></p> 345 <p>Send questions, comments and corrections to editor@bittorrent.org</p> 345 346 <a name="Footnotes"></a> 346 347 <h3>Footnotes</h3>