xmlrpc-stream
Perform XML-RPC using any kind of stream!
Overview
xmlrpc-stream implements the XML and RPC bits of XML-RPC without the implied transport portion. Any duplex stream can be used as a transport.
Installation
Available via npm:
$ npm install xmlrpc-stream
Or via git:
$ git clone git://github.com/deoxxa/xmlrpc-stream.git node_modules/xmlrpc-stream
API
constructor
Creates a new RPC object. Expects a stream factory function as an argument. This factory function will be called whenever a transport is required (read: every single time you call a remote method).
fn;
var rpc = { return net;};
call
Calls a remote method by name, optionally with some parameters, then calls your callback with the result (or an error! woo!).
rpc;
rpc; // OR rpc;
Arguments
- method - a string, naming the remote method to call.
- argN - the parameters for the remote method.
- cb - a callback to be called when the response comes in.
Example
Also see example.js.
This uses scgi-stream as well, but you
could just as easily replace that with net.connect
or something if you had a
remote server that supported XML-RPC over regular TCP sockets.
var scgi = RPC = ; var rpc = { return scgi;}; rpc;
License
3-clause BSD. A copy is included with the source.
Contact
- GitHub (deoxxa)
- Twitter (@deoxxa)
- ADN (@deoxxa)
- Email (deoxxa@fknsrs.biz)