Transport-agnostic RPC libraries utilizing node streams have already become quite popular. In my opinion, there is still a problem, though: What if I need to call methods from both ends? Create tow tcp servers? Ugly.
This little library provides RPC streams that you can use to do traditional client/server or to communicate between peers (both sides act as client & server).
var rpc =net =// This node both// a server ...var server = rpcnet
var rpc =net =var client = rpcvar sock = net
npm install p2p-rpc-stream
(c) 2013 by Marcel Klehr