Subject: Re: integration of c-ares into various file descriptor based main loops [reposted]

Re: integration of c-ares into various file descriptor based main loops [reposted]

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 14 Nov 2013 18:51:21 +0100 (CET)

On Thu, 7 Nov 2013, Pavel Simerda wrote:

> Would you consider an additional API as an alternative to `ares_fds()`,
> `ares_timeout()` and `ares_process_fd()` consisting of functions similar to
> the following ones useful?
>
> * void ares_set_fd_callback(ares_channel channel, int (*callback)(int fd, int events, void *user_data), void *user_data)
> * void ares_set_timeout_callbacks(ares_channel channel, int (*create)(int seconds, void *user_data), int (*remove)(int timeout_id), void *user_data)
> * int ares_dispatch_fd(ares_channel channel, int fd, int events)

Certainly! That seems like a good set of functions that would allow
application to use any kind of socket-waiting functionality, including event
based.

Sorry for not responding this faster.

-- 
  / daniel.haxx.se
Received on 2013-11-14