github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

ericflo / node-jsonrpc

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 24
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Switch Branches (1)
    • master ✓
  • Switch Tags (0)
  • Branch List
Sending Request…

JSON-RPC client and server for node.js — Read more

  Cancel

  Cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Create the client in the call instead of once globally. 
Eric Florenzano (author)
Fri Nov 27 18:04:00 -0800 2009
commit  d16da4e23bbd03fc713364604580db46119f30bd
tree    fb02cc17495c2f5a3c586653c34fae7e73b69581
parent  8210af93f5c4faca0499089ffc711e179b215183
node-jsonrpc /
name age
history
message
file LICENSE Fri Nov 27 03:42:42 -0800 2009 first commit [ericflo]
file Makefile Fri Nov 27 03:42:42 -0800 2009 first commit [ericflo]
file README Fri Nov 27 04:13:53 -0800 2009 Forgot to require sys for the README [ericflo]
directory examples/ Fri Nov 27 12:46:29 -0800 2009 I'm a total idiot, forgot the keyword before p... [ericflo]
directory src/ Fri Nov 27 18:04:00 -0800 2009 Create the client in the call instead of once g... [Eric Florenzano]
directory test/ Fri Nov 27 03:42:42 -0800 2009 first commit [ericflo]
README
This is a JSON-RPC server and client library for node.js <http://nodejs.org/>,
the V8 based evented IO framework.

Firing up an efficient JSON-RPC server becomes extremely simple:

    var rpc = require('jsonrpc');
    
    function add(first, second) {
        return first + second;
    }
    rpc.expose('add', add);
    
    rpc.listen(8000, 'localhost');


And creating a client to speak to that server is easy too:

    var rpc = require('jsonrpc');
    var sys = require('sys');
    
    var client = rpc.getClient(8000, 'localhost');
    
    client.call('add', [1, 2], function(result) {
        sys.puts('1 + 2 = ' + result);
    });

To learn more, see the examples directory, peruse test/jsonrpc-test.js, or
simply "Use The Source, Luke".

More documentation and development is on its way.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server
ZW5kZW5yYWhheXU5QGdtYWlsLmNvbQ==