0rpc/zerorpc-node

Zerorpc and javascript

guzmanf opened this issue · 1 comments

Howto access to zerorpc from javascript ???

phuze commented

You must first require/import zerorpc:

var zerorpc = require("zerorpc");

Then, refer to the zerorpc site for code samples dependent on what you want to do. If you wish to connect to a zerorpc 'server' as a client:

var client = new zerorpc.Client();
client.connect("tcp://127.0.0.1:4242"); #replace with your own IP and port

You can then invoke a function as such:

client.invoke("myFunction", arg1, arg2, arg3);

Please close.