javascript - Attach to a Socket.io server instance in a background task -
i using socket.io in conjunction express in web application this:
var server = express(); var http = require('http').server(server); io = require('socket.io')(http); ... server.set('port', process.env.port || 3000); http.listen(server.get('port'), function() { console.log('listening on port ' + server.get('port')); });
this works totally fine. however, using kue (a job queue system) queue web workers in totally separate thread. need emit messages clients attached socket.io instance shown above web worker. pretty stuck.
does know how this?
Comments
Post a Comment