feat: address manager

This commit is contained in:
Vasco Santos
2020-04-18 23:26:46 +02:00
committed by Jacob Heun
parent 9e9ec0b575
commit 2a7967c1cc
24 changed files with 598 additions and 126 deletions

View File

@ -127,11 +127,13 @@ class TransportManager {
}
/**
* Starts listeners for each given Multiaddr.
* Starts listeners for each listen Multiaddr.
* Update listen multiaddrs of the Address Manager after the operation.
* @async
* @param {Multiaddr[]} addrs
*/
async listen (addrs) {
async listen () {
const addrs = this.libp2p.addressManager.getListenMultiaddrs()
if (addrs.length === 0) {
log('no addresses were provided for listening, this node is dial only')
return