Skip to content

Granola-Team fork of go-mplex for use in building Mina node

License

Notifications You must be signed in to change notification settings

Granola-Team/go-mplex

Repository files navigation

go-mplex

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