twister

Peer-to-peer microblogging

User Tools

Site Tools


development:dht_protocol:apis

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Last revision Both sides next revision
development:dht_protocol:apis [2014/01/30 13:07]
jpfox created
development:dht_protocol:apis [2014/01/30 13:09]
jpfox
Line 21: Line 21:
  
 <code javascript>​ <code javascript>​
-query = {"​t":"​aa",​ "​z":"​q",​ "​q":"​findNode",​ "​x":​ {"​id":"​abcdefghij0123456789",​ "​target":"​mnopqrstuvwxyz123456"​}}+query = {"​t":"​aa",​ "​z":"​q",​ "​q":"​findNode",​ "​x":​ { 
 +  ​"​id":"​abcdefghij0123456789",​ "​target":"​mnopqrstuvwxyz123456"​}}
  
 response = {"​t":"​aa",​ "​z":"​r",​ "​r":​ {"​id":"​0123456789abcdefghij",​ "​nodes":​ "​def456..."​}} response = {"​t":"​aa",​ "​z":"​r",​ "​r":​ {"​id":"​0123456789abcdefghij",​ "​nodes":​ "​def456..."​}}
Line 31: Line 32:
  
 <code javascript>​ <code javascript>​
-query = {"​t":"​aa",​ "​z":"​q",​ "​q":"​announce_peer",​ "​x":​ {"​id":"​abcdefghij0123456789",​ "​implied_port":​ 1, "​info_hash":"​mnopqrstuvwxyz123456",​ "​port":​ 6881, "​token":​ "​aoeusnth"​}}+query = {"​t":"​aa",​ "​z":"​q",​ "​q":"​announce_peer",​ "​x":​ { 
 +  ​"​id":"​abcdefghij0123456789",​ "​implied_port":​ 1, "​info_hash":"​mnopqrstuvwxyz123456",​ 
 +  ​"​port":​ 6881, "​token":​ "​aoeusnth"​}}
  
 response = {"​t":"​aa",​ "​z":"​r",​ "​r":​ {"​id":"​mnopqrstuvwxyz123456"​}} response = {"​t":"​aa",​ "​z":"​r",​ "​r":​ {"​id":"​mnopqrstuvwxyz123456"​}}
Line 46: Line 49:
   "​id":"​abcdefghij0123456789",​ "​sig_p":"​34fdd3wdw",​ "​sig_user":"​nobody",​ "​token":​ "​aoeusnth",​ "​p":​ {   "​id":"​abcdefghij0123456789",​ "​sig_p":"​34fdd3wdw",​ "​sig_user":"​nobody",​ "​token":​ "​aoeusnth",​ "​p":​ {
     "​v"​ : "​arbitrary-value",​ "​seq"​ : "​10",​ "​time"​ : "​13131321321",​ height : "​1000",​ "​target":​ {     "​v"​ : "​arbitrary-value",​ "​seq"​ : "​10",​ "​time"​ : "​13131321321",​ height : "​1000",​ "​target":​ {
-     "​n":"​name",​ "​r":"​resource",​ "​t":"​m"​ }}} +     "​n":"​name",​ "​r":"​resource",​ "​t":"​m"​ }}}}
-}+
  
 response = {"​t":"​aa",​ "​z":"​r",​ "​r":​ {"​id":"​mnopqrstuvwxyz123456"​}} response = {"​t":"​aa",​ "​z":"​r",​ "​r":​ {"​id":"​mnopqrstuvwxyz123456"​}}
development/dht_protocol/apis.txt · Last modified: 2014/01/30 13:30 by jpfox