title: How can a parent process send socket/server object to child process in Node.js?
body: <p>Consider:</p>
  
  <pre><code>// Parent
  
  var child = require('child_process').fork('child.js');
  
  // Open up the server object and send the handle.
  var server = require('net').createServer();
  server.on('connection', function (socket) {
    socket.end('handled by parent');
  });
  server.listen(1337, function() {
    child.send('server', server);
  });
  
  //Child
  process.on('message', function(m, server) {
    if (m === 'server') {
      server.on('connection', function (socket) {
        socket.end('handled by child');
      });
    }
  });
  </code></pre>
  
  <p>As shown in above example, parents sends server object to child processes so that even a child had handle some of client connection requests.</p>
  
  <p>How is it achieved in Node.js?</p>