Skip to content

libp2p/go-mplex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f3f174d · Mar 28, 2025
Mar 28, 2025
Aug 25, 2022
Mar 22, 2016
Aug 25, 2023
Aug 28, 2020
Feb 16, 2025
Apr 18, 2022
Jun 22, 2022
Feb 17, 2025
Mar 3, 2022
Apr 18, 2022

Repository files navigation

DEPRECATED: go-mplex

mplex is deprecated. When on TCP, we recommend using Yamux instead. If TCP is not a requirement, consider using QUIC instead.

Ref: Discussion around mplex deprecation: libp2p/specs#553


Go Reference Discourse posts

A super simple stream muxing library implementing mplex.

Users should prefer yamux over mplex. We would like to deprecate mplex in the future.

Usage

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