Re: Newbie Question: Asynchronous Requests and EventLoop

Hi,

> [...]
> Here's the problem. I send an asynchronous request, and get into the 
> event loop. My call back function is called and everything looks fine, 
> but control is never handed back to my main(), to fire off subsequent 
> requests. Here're a few snippets of my code:
> [...] 

A solution for your problem can be found in the source code of the
xmlrpc-c project which relies on libwww (see
http://xmlrpc-c.sourceforge.net/).

In the file xmlrpc_client.c, functions
xmlrpc_client_event_loop_run_general and timer_callback, the following
mechanism is used: First, before running HTEventList_newLoop a periodic
timer is created which times out in certain intervals (timer =
HTTimer_new ...). Then, the corresponding timer callback stops the
libwww event loop.

Gerald

Received on Monday, 26 July 2004 08:54:54 UTC