A LibP2P Stream Multiplexer protocol
Mplex is a Stream Multiplexer protocol. The origins of this protocol are based in multiplex, the JavaScript-only Stream Multiplexer.
Mplex is a very simple protocol that does not provide many features offered by other stream multiplexers. Notably, mplex does not provide backpressure at the protocol level.
- For more information check out the MPLEX Spec
Include the following dependency in your Package.swift file
let package = Package(
...
dependencies: [
...
.package(url: "https://github.com/swift-libp2p/swift-libp2p-mplex.git", .upToNextMajor(from: "0.1.0"))
],
...
.target(
...
dependencies: [
...
.product(name: "LibP2PMPLEX", package: "swift-libp2p-mplex"),
]),
...
)
import LibP2PMPLEX
/// Tell libp2p that it can use mplex...
app.muxers.use( .mplex )
Not Applicable
Contributions are welcomed! This code is very much a proof of concept. I can guarantee you there's a better / safer way to accomplish the same results. Any suggestions, improvements, or even just critques, are welcome!
Let's make this code better together! 🤝
This repo is just a gnarly fork of the beautiful http2 code by the swift nio team below...
MIT © 2022 Breth Inc.