js-libp2p icon indicating copy to clipboard operation
js-libp2p copied to clipboard

[switch] closing mutliplexed connections

Open wanderer opened this issue 7 years ago • 1 comments

Its would be nice to have an easy way to tell if a multiplexed connection is still in use by a protocol or not. This is needed to be able to close unneeded connections.

wanderer avatar Oct 12 '17 22:10 wanderer

related to https://github.com/libp2p/js-libp2p-connection-manager/issues/16

jacobheun avatar Oct 24 '18 11:10 jacobheun

The connection has a streams property that lets you know how many streams are open/in-use. That can be used to determine wether the connection is in use or not. Closing for now.

p-shahi avatar May 30 '23 15:05 p-shahi