poll file descriptor in node.js

150 views
Skip to first unread message

Henri Tuhola

unread,
Nov 3, 2012, 5:40:20 PM11/3/12
to nod...@googlegroups.com
I want to do an event emitter that gets events from libudev.

udev_monitor_get_fd gives me a file descriptor that I'd need to poll, and once the descriptor wakes up I'd need to call udev_monitor_receive_device to retrieve the event so I can emit it.

Am I able to do this with node.js and libuv or do I need to pack that monitor into it's own thread?

Bert Belder

unread,
Nov 3, 2012, 6:14:01 PM11/3/12
to nod...@googlegroups.com

Henri Tuhola

unread,
Nov 5, 2012, 3:57:12 PM11/5/12
to nod...@googlegroups.com
Thanks from your help.

Reply all
Reply to author
Forward
0 new messages