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

[switch] start and stop accepting connections

Open pgte opened this issue 7 years ago • 4 comments

For each different transport individually, in order to do connection throttling, it's important to be able to start and stop the listener by command of the user.

pgte avatar Apr 23 '18 09:04 pgte

Also depends on fixing these issues:

  • [ ] https://github.com/libp2p/js-libp2p-websocket-star/issues/49
  • [ ] https://github.com/libp2p/js-libp2p-tcp/issues/92

pgte avatar Apr 23 '18 09:04 pgte

Also the UTP transport has the same issue:

  • [ ] https://github.com/libp2p/js-libp2p-utp/issues/76

pgte avatar Apr 23 '18 09:04 pgte

@diasdavid there's an incongruence in the interface-transport docs:

options is an optional object that might contain the following properties:

  • timeout - A timeout value (in ms) that fires and destroys all the connections on this transport if the transport is not able to close graciously. (e.g { timeout: 1000 })

pgte avatar Apr 23 '18 19:04 pgte

We will also need to remove/change the interface-stream-muxer test at https://github.com/libp2p/interface-stream-muxer/blob/v0.5.9/src/close-test.js#L37, as it expects the muxer connections to close when the listener is closed. Instead it should validate the connection is still usable.

jacobheun avatar Nov 02 '18 21:11 jacobheun