1.0.0 • Published 9 years ago
rpc-over-ipc v1.0.0
rpc-over-ipc
Lightweight RPC over IPC for node.js
Install
$ npm i rpc-over-ipcAPI
register(proc, name, func)
proc-ChildProcessinstance orprocessname- function namefunc- asynchronous function to call, last argument should be a callback function that takeserrandresultarguments
Example
var rpc = require('rpc-over-ipc');
rpc.register(process, 'add', function(a, b, callback) {
callback(null, a + b);
});call(proc, name, [args], callback)
proc-ChildProcessinstance orprocessname- function nameargs- array the arguments with whichnamefunction should be called, optionalcallback- callback function which is called whennamefunctions have finished
Example
var rpc = require('rpc-over-ipc');
rpc.call(process, 'add', [1, 2], function(err, result) {
console.log(result);
});License
1.0.0
9 years ago