On Mon, 3 Sep 2007, Uli wrote:
> I recently found out about epoll() and I think its pretty neat, but I
> couldn't use it with c-ares. Is it even easily possible to use APIs like
> epoll / kpoll etc with c-ares?
It is, and in libcurl we take advantage of it and allows the user to use
whatever underlying system (s)he wants. I've personally used libevent while
working on this implementation.
> The only way I found is using ares_getsock(), adding each of those fds for
> epoll and removing them after epoll_wait() which isn't a nice way of doing
> this.
I added ares_getsock() for the purpose of extracting the sockets for this
purpose. I don't quite see why you need to remove them afer epoll_wait(), but
then I'm not an expert on epoll.
> Thanks for any help, also if it's just 'No, not possible'.
In any case, we're always interested in discussion how things can be
improved/changed in the future to make c-ares better!
-- c-ares -- my preferred DNS asynch resolver libraryReceived on 2007-09-04