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.
// pushes an easy handle onto the hyper handle.
void hiper_push(hiper_handle, CURL *easy);
// blocks until all easy handles are done processing.
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
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-11-07
- application/octet-stream attachment: iocp.c