Lightweight RPC over IPC for node.js
npm install rpc-over-ipcLightweight RPC over IPC for node.js
bash
$ npm i rpc-over-ipc
`API
$3
* proc - ChildProcess instance or process
* name - function name
* func - asynchronous function to call, last argument should be a callback function that takes err and result arguments#### Example
`js
var rpc = require('rpc-over-ipc');
rpc.register(process, 'add', function(a, b, callback) {
callback(null, a + b);
});
`$3
* proc - ChildProcess instance or process
* name - function name
* args - array the arguments with which name function should be called, optional
* callback - callback function which is called when name functions have finished#### Example
`js
var rpc = require('rpc-over-ipc');
rpc.call(process, 'add', [1, 2], function(err, result) {
console.log(result);
});
``