Eugen-Andrei Gavriloaie
unread,May 26, 2019, 4:01:40 PM5/26/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libuv
We know that kqueue and epoll can be cascaded. I have a library which is available only for systems that have kqueue or epoll. Internally, this library is having a bunch of file descriptors like sockets and timers that are tested for events using epoll/kqueue. Finally, this library is exposing this epoll/kqueue fd as an unique file descriptor which designates a session. This can then be tested for events in other upper layers using epoll/kqueue. Of course, the only valid event for this cascaded unique file descriptor is the read event which informs the user of the library that something happened on that session designated by the file descriptor.
I have searched a way to convince libuv to accept a generic file descriptor and listen for read events, but I did not find such a thing.
Is there a way to tell libuv about an FD and only report back when events are happening, not actually doing any reading on it?
Best regards,
Andrei