cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Socket callback not firing

From: Steve Ellis <steve_at_changesciences.com>
Date: Tue, 20 Oct 2009 11:30:53 -0400

Daniel Stenberg wrote:
> On Mon, 19 Oct 2009, Steve Ellis wrote:
>
> It seems you never run the libevent dispatcher function, so thus it
> never checks or acts on any socket events. Compare with how the
> hiperfifo.c example calls event_dispatch(). I would assume you could
> make it work like this:
>
> new_conn("http://www.yahoo.com", &g);
>
> + event_dispatch();
>
> curl_multi_cleanup(g.multi);

Thanks Daniel. You're right. Adding event_dispatch *after* new_conn
allows the socket events to be acted upon. I was under the impression
that event_dispatch() had to be called *before* handles got added.
Thanks again for looking at the code and making the suggestion.

Steve

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-10-20

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET