Skip to content

Commit

Permalink
feat: set and hook up libp2p-connection-manager (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Teixeira authored and daviddias committed Jun 20, 2018
1 parent 28ffa0c commit d597204
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -38,14 +38,15 @@
"homepage": "https://github.com/libp2p/js-libp2p",
"dependencies": {
"async": "^2.6.0",
"libp2p-connection-manager": "~0.0.2",
"libp2p-floodsub": "^0.15.0",
"libp2p-ping": "~0.8.0",
"libp2p-switch": "~0.40.4",
"libp2p-websockets": "^0.12.0",
"mafmt": "^6.0.0",
"multiaddr": "^5.0.0",
"peer-book": "~0.8.0",
"peer-id": "~0.10.7",
"libp2p-websockets": "^0.12.0",
"peer-info": "~0.14.1"
},
"devDependencies": {
Expand All @@ -62,14 +63,14 @@
"libp2p-secio": "~0.10.0",
"libp2p-spdy": "~0.12.1",
"libp2p-tcp": "~0.12.0",
"libp2p-webrtc-star": "~0.15.0",
"libp2p-websocket-star": "~0.8.0",
"libp2p-websocket-star-rendezvous": "~0.2.3",
"lodash.times": "^4.3.2",
"pull-goodbye": "0.0.2",
"pull-serializer": "~0.3.2",
"pull-stream": "^3.6.8",
"sinon": "^5.0.7",
"libp2p-webrtc-star": "~0.15.0",
"wrtc": "0.1.1"
},
"contributors": [
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
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 d597204

Please sign in to comment.