ros

1.0.4 • Public • Published

basic RPC system for mesh. Allows you to execute remote operations, and receive responses.

Bus example:

var ros    = require("ros");
var mesh   = require("mesh");
var io     = require("socket.io");
var memory = require("mesh-memory");
 
 
 
function realtime(options, appBus) {
  var client = io(options);
  return ros(client.on.bind(client, "message"), client.emit.bind("message"), appBus);
}
 
// local
var bus = realtime("http://localhost:8080");
 
bus(mesh.op("load")).on("data", function() {
 
});
 

Readme

Keywords

none

Package Sidebar

Install

npm i ros

Weekly Downloads

10

Version

1.0.4

License

ISC

Last publish

Collaborators

  • architectd
  • crcn