cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Advanced API?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 16 Oct 2001 10:39:32 +0200 (MET DST)

On Mon, 15 Oct 2001, Sterling Hughes wrote:

> Not to rehash an old issue, but... ;)

Some golden moments from the past: :-)

        "we have a project started, aiming at rewriting libcurl"
        http://curl.haxx.se/mail/archive_pre_oct_99/0096.html

        "is there a need for a better libcurl"
        http://curl.haxx.se/mail/archive-2000-03/0066.html

        'anyone for "low level"'
        http://curl.haxx.se/mail/lib-2001-02/0039.html

> Are there any plans for that old advanced api?

I ran a very informal poll back in Febrary and the responses I got basically
all said "no, we're happy with the current interface".

I would personally like to see an "advanced" more low level API, but I have
no illusions that I can pull this off by myself so until someone steps
forward to participate on this, I am not exploring those possibilities.

> I'm coming into a situation now, where i want to use
> "read-when-available" processing with curl (ie, curl_read(), with
> similair semantics to fread()). I know that processing multiple requests
> is pretty simple when you have threads (or just forking :), but in some
> situations (ie from php) you can't do it this way, and you need away to
> read the requests small bits at a time, etc.

You'd also want to somehow make the actual file/socket descriptor available
to the outside so that people could select() on several simultanoues
connections.

> are there any plans for adding a stdio type of interface to cURL? (or is
> the noise I'm making the sound of me volunteering :)

I'd happily join a devloper group aiming to get such an interface working the
moment there is one! We'd need to set some basic goals and start scetching on
how the interface would/could look like.

As a side-note, I don't think there currently exists any HTTP or FTP library
that offers such an interface. The best HTTP library competitor (IMO) out
there, is neon, and it uses callbacks in a similar manner that libcurl does.
The upcoming apache http library (named serf) is planned to offer both kinds
of interfaces ("push" and "pull") but serf is gonna rely on APR and is likely
to be very apache-centric which I think is gonna make it less attractive as
an alternative to most non-apache related projects.

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