https://github.com/libp2p/go-mplex
A port of maxogden's multiplex to go
https://github.com/libp2p/go-mplex
Last synced: about 1 year ago
JSON representation
A port of maxogden's multiplex to go
- Host: GitHub
- URL: https://github.com/libp2p/go-mplex
- Owner: libp2p
- License: mit
- Created: 2015-06-30T01:11:15.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2025-03-29T08:32:26.000Z (over 1 year ago)
- Last Synced: 2025-04-01T09:31:46.790Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 271 KB
- Stars: 38
- Watchers: 20
- Forks: 20
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DEPRECATED: go-mplex
mplex is deprecated. When on TCP, we recommend using [Yamux](https://github.com/libp2p/go-yamux/) instead.
If TCP is not a requirement, consider using QUIC instead.
Ref: Discussion around mplex deprecation: https://github.com/libp2p/specs/issues/553
---
[](https://protocol.ai)
[](https://pkg.go.dev/github.com/libp2p/go-mplex)
[](https://libp2p.io/)
[](http://webchat.freenode.net/?channels=%23libp2p)
[](https://discuss.libp2p.io)
A super simple [stream muxing](https://docs.libp2p.io/concepts/stream-multiplexing/) library implementing [mplex](https://github.com/libp2p/specs/tree/master/mplex).
Users should prefer [yamux](https://github.com/libp2p/go-libp2p/tree/master/p2p/muxer/yamux) over mplex. We would like to deprecate mplex in the future.
## Usage
```go
mplex := multiplex.NewMultiplex(mysocket)
s, _ := mplex.NewStream()
s.Write([]byte("Hello World!"))
s.Close()
os, _ := mplex.Accept()
// echo back everything received
io.Copy(os, os)
```
---
The last gx published version of this module was: 0.2.35: QmWGQQ6Tz8AdUpxktLf3zgnVN9Vy8fcWVezZJSU3ZmiANj