rust-libp2p
rust-libp2p copied to clipboard
Enforce back-pressure on incoming substreams using new `StreamMuxer` interface
Once https://github.com/libp2p/rust-libp2p/issues/2722 is complete, I would suggest we inline the HandlerWrapper component into the swarm::Connection struct.
This will resolve some indirection which:
- Allows us to use the incoming substream limit to enforce back-pressure
- Simplifies understanding of the code because
StreamMuxerandConnectionHandlerare polled by the same component (Connection) and directly pass data between each other instead of going through another layer.