A LibP2P Stream Multiplexer protocol
Yamux is a Stream Multiplexer protocol.
Yamux uses a single streaming connection underneath, but imposes message framing so that it can be shared between many logical streams. These logical streams support windowing which provides a soft version of backpressure.
- For more information check out the YAMUX Spec
Include the following dependency in your Package.swift file
let package = Package(
...
dependencies: [
...
.package(url: "https://github.com/swift-libp2p/swift-libp2p-yamux.git", .upToNextMinor(from: "0.0.1"))
],
...
.target(
...
dependencies: [
...
.product(name: "LibP2PYAMUX", package: "swift-libp2p-yamux"),
]),
...
)
import LibP2PYAMUX
/// Tell libp2p that it can use yamux...
app.muxers.use( .yamux )
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 critiques, 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 © 2025 Breth Inc.