erbridge

A simplified version of wormhole for server/client IPC. Provides auto reconnection support and bi-directional communication

npm install erbridge
23 downloads in the last month

Description

A simplified version of wormhole but with changes. Provides auto reconnection support and bi-directional communication.

Installation

npm install erbridge

Usage

var ERBridge = require("erbridge");

var bridge = new ERBridge();
bridge.on("available", function(b) { console.log("AVAILABLE!"); });
bridge.on("unavailable", function(b) { console.log("UNAVAILABLE!"); });
bridge.on("message", function(obj, socketid) { console.log("MESSAGE [%j] on socket [%s]", obj, socketid); );

//bridge.listen(host, port);        // Start Server
//bridge.connect(host, port);        // or connect to server

bridge.send({abc : 123});
npm loves you