mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-03-16 15:40:49 +00:00
feat: set and hook up libp2p-connection-manager (#184)
This commit is contained in:
parent
28ffa0c7dc
commit
d5972045da
@ -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": {
|
||||
@ -62,6 +63,7 @@
|
||||
"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",
|
||||
@ -69,7 +71,6 @@
|
||||
"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": [
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user