Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

[WIP] feat: Add rendezvous #1396

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/core/components/libp2p.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
const Node = require('../runtime/libp2p-nodejs')
const promisify = require('promisify-es6')
const get = require('lodash.get')
const Rendezvous = require('libp2p-rendezvous')

module.exports = function libp2p (self) {
return {
Expand Down Expand Up @@ -33,6 +34,8 @@ module.exports = function libp2p (self) {
}

self._libp2pNode = new Node(self._peerInfo, self._peerInfoBook, options)
const rendezvous = self.rendezvous = new Rendezvous(self._libp2pNode)
self._libp2pNode.modules.discovery.push(rendezvous)

self._libp2pNode.on('peer:discovery', (peerInfo) => {
const dial = () => {
Expand Down