new StreamManager(multicodec, getConnections, addEventListener): waku.StreamManager
Parameters
multicodec: string
getConnections: ((peerId?) => Connection[])
(peerId?): Connection[]
Return a list of all connections this node has open, optionally filtering
by a PeerId
Parameters
OptionalpeerId: PeerId
Returns Connection[]
Example
for (constconnectionoflibp2p.getConnections()) { console.log(peerId, connection.remoteAddr.toString()) // Logs the PeerId string and the observed remote multiaddr of each Connection }
Return a list of all connections this node has open, optionally filtering by a PeerId