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

Enforce back-pressure on incoming substreams using new `StreamMuxer` interface

Open thomaseizinger opened this issue 3 years ago • 0 comments

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 StreamMuxer and ConnectionHandler are polled by the same component (Connection) and directly pass data between each other instead of going through another layer.

thomaseizinger avatar Aug 03 '22 16:08 thomaseizinger