Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 如何使用BitTorrent DHT在两个节点之间建立P2P连接?_Node.js_Bittorrent_Handshake_Dht - Fatal编程技术网

Node.js 如何使用BitTorrent DHT在两个节点之间建立P2P连接?

Node.js 如何使用BitTorrent DHT在两个节点之间建立P2P连接?,node.js,bittorrent,handshake,dht,Node.js,Bittorrent,Handshake,Dht,我知道BitTorrent DHT可以用来协调Torrent,而不需要跟踪器。现在,我想构建一个由节点组成的P2P网络,我更愿意避免开发自己的发现/信令/握手/NAT遍历的麻烦 所以我想知道:是否有任何库(最好是nodejs)可以用于: 在节点a上生成标识符 在节点B上,使用a的标识符连接到a 两个节点都有一个套接字回调,准备好写了吗 我的意思是,这应该是BitTorrent握手协议的一部分,但是我不想直接使用torrent协议来发送数据,而是想直接与另一个节点对话,实现我自己的协议 有可能

我知道BitTorrent DHT可以用来协调Torrent,而不需要跟踪器。现在,我想构建一个由节点组成的P2P网络,我更愿意避免开发自己的发现/信令/握手/NAT遍历的麻烦

所以我想知道:是否有任何库(最好是nodejs)可以用于:

  • 在节点a上生成标识符
  • 在节点B上,使用a的标识符连接到a
  • 两个节点都有一个套接字回调,准备好写了吗
我的意思是,这应该是BitTorrent握手协议的一部分,但是我不想直接使用torrent协议来发送数据,而是想直接与另一个节点对话,实现我自己的协议


有可能吗?

bittorrent DHT和bittorrent数据传输协议是分开的。因此,可以通过DHT找到其他IP/端口联系人,并使用自定义协议与之连接