W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2004

Re: Newbie Question: Asynchronous Requests and EventLoop

From: Gerald Kuehne <Gerald.Kuehne@gmx.de>
Date: Mon, 26 Jul 2004 14:59:42 +0200
Message-ID: <4105003E.8050101@gmx.de>
To: www-lib@w3.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:44 GMT