Skip to content

Commit

Permalink
docs: add note about muxer ordering (#1779)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-shahi authored May 31, 2023
1 parent 0d62557 commit 41641f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- [Modules](#modules)
- [Transport](#transport)
- [Stream Multiplexing](#stream-multiplexing)
- [Muxer Selection](#muxer-selection)
- [Connection Encryption](#connection-encryption)
- [Peer Discovery](#peer-discovery)
- [Content Routing](#content-routing)
Expand Down Expand Up @@ -89,6 +90,10 @@ Some available stream multiplexers are:
- [@libp2p/mplex](https://github.com/libp2p/js-libp2p-mplex)
- [@chainsafe/libp2p-yamux](https://github.com/chainsafe/js-libp2p-yamux)

Some transports such as WebRTC and WebTransport come with their own built-in stream multiplexing capabilities.

If you configure multiple muxers for use in your application, js-libp2p will choose the first muxer in the list. Therefore, ordering matters.

If none of the available stream multiplexers fulfills your needs, you can create a libp2p compatible stream multiplexer. A libp2p multiplexer just needs to be compliant with the [Stream Muxer Interface](https://github.com/libp2p/js-interfaces/tree/master/src/stream-muxer).

If you want to know more about libp2p stream multiplexing, you should read the following content:
Expand Down

0 comments on commit 41641f1

Please sign in to comment.