Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Shoe & mux demux with reconnect!

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 example
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENCE
Octocat-spinner-32 README.md
Octocat-spinner-32 browser.js
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
README.md

boot

An automatic reconnect mux-demux-shoe

The mdm connection you get from shoe will magically handle reconnection logic for you under the hood. You just play with streams

Client Example

var boot = require('boot')
    , mdm = boot("/boot")

var one = mdm.createStream("one")

one.on("data", console.log.bind(console, "client"))

one.write("hello world")

Server Example

var boot = require("boot")
    , through = require("through")
    , echoStream = through()

var sock = boot(function (stream) {
    // stream from MuxDemux with the meta property set
    if (stream.meta === "one") {
        stream.on("data", console.log.bind(console, "server"))
        stream.pipe(echoStream, { end: false }).pipe(stream)
    }
})

sock.install(server, "/boot")

Installation

npm install boot

Contributors

  • Raynos

MIT Licenced

Something went wrong with that request. Please try again.