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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -