feat: set and hook up libp2p-connection-manager (#184)

This commit is contained in:
Pedro Teixeira
2018-06-20 11:19:37 +01:00
committed by David Dias
parent 28ffa0c7dc
commit d5972045da
2 changed files with 5 additions and 2 deletions

View File

@ -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')
@ -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) {