Re: [nodejs] Re: How to handle multiple, dynamically created listeners to a single ChildProcess in NodeJS?

2015-07-05 Thread Sam Roberts
none of your code shows the definition of `io`, so its not possible to comment. On Sun, Jun 28, 2015 at 10:03 AM, Konrad Moskal wrote: > I have already found out that this should be a reasonable solution, right? > :) > > //foobar.js > worker.on('message', function(responseData) { > // assuming

[nodejs] Re: How to handle multiple, dynamically created listeners to a single ChildProcess in NodeJS?

2015-06-29 Thread Konrad Moskal
I have already found out that this should be a reasonable solution, right? :) //foobar.js worker.on('message', function(responseData) { // assuming worker returns `{id: ..., data: ...}` var socket = io.sockets.sockets[responseData.id]; socket.emit('response', responseData.data);}); io.socke