cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl-library

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 16 Dec 2014 22:59:19 +0100 (CET)

On Tue, 16 Dec 2014, Ewe wrote:

> Does curl-library ever use epoll, kqueue, etc. on unixes and fast IO
> Completion ports on Windows?

No, never. It is explicitly designed not to do that. It works with any of
them (if they handle event-based sockets/file descriptors).

> Or is this only from other libraries... for example, the sample code in
> multi-uv.c uses some library called libuv -- so is the epoll, kqueue, etc.
> actually done in libuv and not libcurl?

Exactly. The examples actually use several different event-libraries. Pick
your favorite!

> Under typical usage,
> http://curl.haxx.se/libcurl/c/curl_multi_socket_action.html
>
> Point 5 is pretty vague, so is libuv an option (in addition to libevent, and
> glib)?

Yes libuv and libevent are two event libraries you can use and I'm not sure
glib is the best choice for everyone but you can interact with it using this
libcurl API. libev is yet another choice. I bet there are more.

> And do I need such a library to achieve epoll, kqueue, IO Completion ports?

If you want to do event-based programming in a portable manner then yes,
otherwise you can also just interface epoll etc directly. libcurl doesn't make
that choice for you.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-12-16