cURL / Mailing Lists / curl-library / Single Mail


Re: Socket callback not firing

From: Steve Ellis <>
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("", &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.


List admin:
Received on 2009-10-20