[Libevent-users] [PATCH] Add autoconf/make functionality for
--disable-dns, --disable-http, and --disable-bevents
Nick Mathewson
nickm at freehaven.net
Tue Oct 2 12:20:29 EDT 2007
On Tue, Oct 02, 2007 at 09:35:48AM +0200, Robert Iakobashvili wrote:
[...]
> libcurl has developed a good API for its integration with libevent.
> libcurl project also maintains and develops a very good asynchronous DNS
> client library, called c-ares (a clone of ares).
>
> Could it be a better path to concentrate the community efforts on
> integration of c-ares and libcurl with libevent and to assist better
> to applications?
I would love somebody to get c-ares working right with libevent. I
don't think this is a matter of "concentrating the community efforts",
however: I think it's a matter of somebody stepping up to contribute
the right patch to c-ares.
The last time I checked, the main problems preventing c-ares from
working optimally with libevent were:
o C-ares had functions to fetch a list of sockets that needed
to be read and written, but no way to make a callback happen when
that list changes. This is fine for select() and poll(), but
Libevent, on the other hand, wants to be told about _changes_ in
socket state via event_add and event_del.
Fixing this is probably a matter of adding a callback facility to
c-ares.
o The only way to tell c-ares about readable/writable sockets was
via a function, ares_process(), that took an fd_set. This is
suboptimal because 1) Libevent wants to alert applications about
one socket at a time, and 2) Libevent is designed for situations
where there are thousands of sockets, and making an fd_set with
thousands of elements gives awful performance.
Fixing this is probably a matter of adding an alternate way to
invoke functionality of ares_process().
Of course, stuff may have changed since then; these problems may be
solved.
(I, _personally_, don't think I could use c-ares for my needs, since I
need DNS server support as well as client support, and I'm under the
impression that c-ares only provides the latter. But the more
libraries that support libevent, the better.)
yrs,
--
Nick Mathewson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20071002/3eb83df9/attachment.bin
More information about the Libevent-users
mailing list