I read that you can split sockets between processes. Is this also possible in Node.js?
I saw an api cluster in Node.js, but that is not what I am looking for. I want to be able to accept a connection in one process, maybe send and read a bit, and after a while transfer this socket to another completely independent Node.js. process.
I could already do this with piping, but I do not want to do this, since it is not as fast as reading / writing directly to the socket itself.
Any ideas?
Update I found the following entry in the Node.js documentation:
new net.Socket([options])
I think it would be possible to set the âfdâ property in the filedescriptor of the socket, and then open the socket with this. But ... How can I get the filedescriptor of the socket and pass it to the process that it needs?
Thanks for any help!
source share