I'm now using it to deal with the socket multi process problem.
$ npm install redis-request
const RedisRequest = require('redis-request');
const redisRequest = RedisRequest(new Redis(), new Redis());
redisRequest.extends({ broadcast: require('./test/extends/broadcast') });
redisRequest.onerror = function(error){
console.log(error);
};
// 所有进程都能收到这次广播事件,redisRequest.broadcast.onmessage可以收到事件
redisRequest.broadcast('join', { userName: '小王', user_id: '123456789', sex: 0 });
The example for socket.io multi process.
$ mocha