Skip to content

Commit

Permalink
hooking up libp2p-connection-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte committed Apr 6, 2018
1 parent bb0c990 commit b3ec918
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"homepage": "https://github.com/libp2p/js-libp2p",
"dependencies": {
"async": "^2.6.0",
"libp2p-connection-manager": "^0.1.0",
"libp2p-floodsub": "^0.15.0",
"libp2p-ping": "~0.7.0",
"libp2p-switch": "~0.39.0",
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const PeerBook = require('peer-book')
const Switch = require('libp2p-switch')
const Ping = require('libp2p-ping')
const WebSockets = require('libp2p-websockets')
const ConnectionManager = require('libp2p-connection-manager')

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

this.switch = new Switch(this.peerInfo, this.peerBook, _options.switch)
this.stats = this.switch.stats
this.connectionManager = new ConnectionManager(this, _options.connectionManager)

// Attach stream multiplexers
if (this.modules.connection && this.modules.connection.muxer) {
Expand Down

0 comments on commit b3ec918

Please sign in to comment.