Invoked after upgrading a multiaddr connection has finished
Return connections, optionally filtering by a PeerId
const connections = libp2p.connectionManager.get(peerId)
// []
Optional
peerId: PeerIdReturn a map of all connections with their associated PeerIds
const connectionsMap = libp2p.connectionManager.getConnectionsMap()
Return the list of in-progress or queued dials
const dials = libp2p.connectionManager.getDialQueue()
Open a connection to a remote peer
const connection = await libp2p.connectionManager.openConnection(peerId)
Optional
options: AbortOptions
Invoked after an incoming connection is opened but before PeerIds are exchanged, this lets the ConnectionManager check we have sufficient resources to accept the connection in which case it will return true, otherwise it will return false.