multiplex-rpc
rpc with multiplexed duplex streams
like rpc-with-streams but using multiplex instead of mux-demux
example
server:
var RPC = ;var net = ;var fs = ;var server = net;server;
client:
var RPC = ;var net = ;var rpc = ;rpc;var client = rpc;client;
methods
var RPC =
var rpc = RPC(api)
Create a new rpc duplex stream instance rpc
that wraps the interface api
similarly to rpc-stream.
var client = rpc.wrap(methods)
Create an interface client
based on methods
, an array of string method
names. Method names that end with :s
are interpreted as duplex stream methods.
install
With npm do:
npm install multiplex-rpc
license
MIT