cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Project hiper - High Performance libcurl

From: Cory Nelson <phrosty_at_gmail.com>
Date: Mon, 7 Nov 2005 01:53:25 -0800

Sorry for the late reply, been busy...

Here is a small sample that should give you the idea. Unfortunately I
don't know *nix APIs very well, so I'm unable to guess the best API
that would work for the both of them.

I'd make something like:

// called on completion, error, etc..
typedef void (*hiper_callback)(int status, CURL *easy);

// creates the handler.
hiper_handle hiper_create(hiper_callback);
void hiper_destroy(hiper_handle);

// pushes an easy handle onto the hyper handle.
void hiper_push(hiper_handle, CURL *easy);

// blocks until all easy handles are done processing.
void hiper_wait(hiper_handle);

The big change is making the wait function optional- blocking doesn't
belong in a high perf app. I'm assuming that function currently
processes all the sockets- I believe that should all be done in the
background for the user so CURL can make proper use of SMP if it's
available. And maybe add another function to pull the current status
of an easy handle.

What are your thoughts?

On 11/4/05, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Fri, 4 Nov 2005, Cory Nelson wrote:
>
> > I don't think this maps very well to your API... perhaps we can discuss this
> > further to make sure both platforms perform efficiently. I'll be gone today
> > but will write up some basic code for you to get the idea of how IOCP
> > handles sockets.
>
> I'd appreciate it and I certainly am open for suggestions and discussions
> around how to do the API so that we can get the best performance on Windows as
> well.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>

--
Cory Nelson
http://www.int64.org

  • application/octet-stream attachment: iocp.c
Received on 2005-11-07