Skip to content

Commit b3ec918

Browse files
committed
hooking up libp2p-connection-manager
1 parent bb0c990 commit b3ec918

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"homepage": "https://github.com/libp2p/js-libp2p",
3939
"dependencies": {
4040
"async": "^2.6.0",
41+
"libp2p-connection-manager": "^0.1.0",
4142
"libp2p-floodsub": "^0.15.0",
4243
"libp2p-ping": "~0.7.0",
4344
"libp2p-switch": "~0.39.0",

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const PeerBook = require('peer-book')
1111
const Switch = require('libp2p-switch')
1212
const Ping = require('libp2p-ping')
1313
const WebSockets = require('libp2p-websockets')
14+
const ConnectionManager = require('libp2p-connection-manager')
1415

1516
const peerRouting = require('./peer-routing')
1617
const contentRouting = require('./content-routing')
@@ -37,6 +38,7 @@ class Node extends EventEmitter {
3738

3839
this.switch = new Switch(this.peerInfo, this.peerBook, _options.switch)
3940
this.stats = this.switch.stats
41+
this.connectionManager = new ConnectionManager(this, _options.connectionManager)
4042

4143
// Attach stream multiplexers
4244
if (this.modules.connection && this.modules.connection.muxer) {

0 commit comments

Comments
 (0)