Optional
peerId: PeerIdfor (const connection of libp2p.getConnections()) {
console.log(peerId, connection.remoteAddr.toString())
// Logs the PeerId string and the observed remote multiaddr of each Connection
}
Optional
options: boolean | AddEventListenerOptionsPrivate
addOptional
options: boolean | AddEventListenerOptionsPrivate
getReturn a list of all connections this node has open, optionally filtering by a PeerId
Optional
peerId: PeerIdfor (const connection of libp2p.getConnections()) {
console.log(peerId, connection.remoteAddr.toString())
// Logs the PeerId string and the observed remote multiaddr of each Connection
}
Private
Readonly
logPrivate
multicodecPrivate
ongoingPrivate
streamPrivate
createPrivate
createPrivate
getPrivate
handlePrivate
isPrivate
lockPrivate
schedule
Return a list of all connections this node has open, optionally filtering by a PeerId