mux-demux-net

Generate TCP servers that serve MDM streams

mux-demux-net

Generate TCP servers that serve MDM streams.

Because opening net servers and piping is too much work!

var MuxDemux = require("mux-demux-net")
    , mdm = MuxDemux(8642)
 
var stream = mdm.createStream("winning")
stream.on("data", console.log.bind(console, "[CLIENT]"))
stream.write("client")
var MuxDemux = require("..")
 
MuxDemux(function (stream) {
    stream.on("data", console.log.bind(console, "[SERVER]"))
    stream.write("server")
}, 8642)

npm install mux-demux-net

make test

  • Raynos