socket.io adapter zeromq implementation.
$ npm install socket.io-zeromq
required the following:
var io = require('socket.io')(3000);
var zmq = require('socket.io-zeromq');
io.adapter(zmq({
host: '127.0.0.1',
pubPort: 5555,
subPort: 5556
}));
The following options are allowed:
key: the name of the key to pub/sub events on as prefix (socket.io-zmq)host: host to connect to zeromq pub/sub server on (127.0.0.1)pubPort: port to connect to publisher of zeromq pub/sub server on (5555)subPort: port to connect to subscriber of zeromq pub/sub server on (5556)pubClient: optional, the zeromq client to publish events onsubClient: optional, the zeromq client to subscribe to events onIf you decide to supply pubClient and subClient, make sure you use node-zeromq as a client or one with an equivalent API.
First, run the socket.io zeromq server
$ socket.io-zeromq-server
after that, run the test.
$ make test
See the LICENSE.
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.