Skip to content

Santinell/zmqTransport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

zmqTransport

ZeroMQ transport for JRPC2

INSTALL

npm install zmq-transport

USING

Server

  var rpc = require('jrpc2');
  var zmqTransport = require('zmq-transport');

  var server = new rpc.Server();  

  server.loadModules(__dirname + '/modules/', function () {
    var zmq = new zmqTransport({url: 'tcp://127.0.0.1:5555'});
    zmq.listen(server);
  });

Client:

  var rpc = require('jrpc2');
  var zmqTransport = require('zmq-transport');

  var zmq = new zmqTransport({url: 'tcp://127.0.0.1:5555'});

  var client = new rpc.Client(zmq);

  client.invoke('users.auth', ["admin","swd"], function (err, raw) {
    console.log(err, raw);
  });

About

ZeroMQ transport for JRPC2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published