Bidirectional rpc over tcp for node.js