Node.js pass handle of response object handle to child process
I have an http server and a forked child process. I want the parent to receive requests and pass to forked process using worker.send . and the worker should be able to process and send the response back to the requester using the same response object. I tried sending the response object in the second parameter of worker.send , but it gives the error This handle type can't be sent var child_process = require('child_process'); var worker = child_process.fork(filename); http.createServer(function (req, res) { worker.send({ 'event': 'start' }, res); // send response object }).listen(4000); I