Advertisement
Guest User

Untitled

a guest
May 4th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. redis_broadcast.psubscribe('*', function (err, count) {
  2.  
  3. });
  4.  
  5. redis_broadcast.on('pmessage', function (subscribed, socketFunction, message) {
  6.     // id like to use get_users below
  7.     // socketFunction = get_users
  8.     // message is the data
  9. });
  10.  
  11.  
  12. io.on('connection', function (socket) {
  13.  
  14.     socket.on('get_users', function () {
  15.        
  16.     });
  17.  
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement