On Thu, Dec 27, 2012 at 7:14 PM, Adam Chappell <[email protected]> wrote: > I've realised, with a mixture of confusion and frustration, that the latest > versions of node.js - 0.8.16 is what I'm using - no longer seems to support > the passing of file descriptors across UNIX domain sockets. > > I was intending to use this functionality, along with an external "FD > factory app" to receive SOCK_RAW sockets for a particularly bespoke Linux > app, in order to capitalise on node.js's much acclaimed async I/O framework. > It was no surprise to me that creation of SOCK_RAW sockets per se, wasn't > supported, but I had held out some hope that if I could get the external app > to create the socket, call the appropriate setsockopt's then pass the > descriptor back to node.js, I would be able to make use of it in a similar > fashion to a UDP/Datagram type socket. > > But alas, no, the 'fd' event, and even the 3-parameter socket.write() call > appear to have disappeared, thwarting my attempts. I realise that a lot of > work has gone on with child process support and clusters/workers, but this > isn't quite my use case. I was simply hoping to interface with an external > non-node.js app in order to receive an FD. > > Does anyone with any experience in this area, or any suggestions? Is there > another way to do what I am trying to do? (Ultimately, use node.js with a > AF_UNIX SOCK_STREAM and an AF_INET SOCK_RAW on Linux).
You could write a small add-on that uses uv_poll_init() and friends to watch the file descriptor. If you model it after the v0.4 IOWatcher interface, you'll make a few people quite happy. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
