forked from cerc-io/ipld-eth-server
311 B
311 B
go-mplex
A super simple stream muxing library implementing mplex.
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)