rpc-socket

RPC like calling over different types of sockets

npm install rpc-socket
31 downloads in the last week
61 downloads in the last month

RPC-Socket

This is a project that I have been working on for a bit.

Install

NPM

Yeah so to install is real easy.

npm install rpc-socket

Basic usage.

Uses the server.

var Server = require('./lib/server')

var server = new Server({
    port : 8000
})

server.rpc.expose('server', {
    test : function() {
        this.send({
            hello : 'world'
        })
    }
})

Uses the Client.

<script src="engine.io.js"></script>
<script src="rpc-socket.js"></script>
<script>

    var rpc = new RpcModule()
    rpc.connect('ws://localhost:8000')
    rpc.invoke('server.test', [], console.log.bind(console))
</script>
npm loves you