cURL / Mailing Lists / curl-library / Single Mail

curl-library

working on a new API

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 26 Oct 2001 12:06:56 +0200 (MET DST)

On Thu, 25 Oct 2001, Steve Dekorte wrote:

(hey I updated the subject to actually match what we're talking about)

> Here's how it might work:
>
> In curl_select_perform(), put your sockets into a readset and call
> something like:

Yes, curl_select_perform() would then typically be called from an
applications select() loop after one of curl's FDs got ready for treatment.

> So curl_select_perform(select_handle) is called as part of the app's run
> loop - every 1/x of a second, let's say. You call it, it finds which
> handles have waiting data and tells them to read it and returns
> immediately. When one curl_handle is done(or wants to send progress data)
> it calls a callback.

I like this, and I can see how all these three mail threads on possible new
APIs all move in the same direction. I think the main point of this being
that we all want to have/allow the application to drive the action, instead
of just being told by curl when there's data to read or write.

I tried to collect some thoughs and I even provided a tiny "example
application". Have a look!

        http://curl.haxx.se/dev/new-API.txt

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-10-26