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

FW: HTLoadToChunk() will block for a long period

From: EricLiu <EricLiu@moxrd.com>
Date: Thu, 31 Jul 2008 10:56:25 +0800
To: <www-lib@w3.org>
Message-ID: <157CD7C3D7C64E43A0F09E2CF9A345E7@moxericliu>

Hi, folks:

    if (url) {
	char * cwd = HTGetCurrentDirectoryURL();
	char * absolute_url = HTParse(url, cwd, PARSE_ALL);
	chunk = HTLoadToChunk(absolute_url, request);
	HT_FREE(absolute_url);
	HT_FREE(cwd);
 }


Using the above code from the chunk.c exmaple, is it possible to set a timeout on the request without using an event loop? If the target server is not responding then the call HTLoadToChunk() will block for a long period.
Is there a simple function to set a timeout, I can't seem to find one in the documentation.



Thanks and Regards
Eric
Received on Thursday, 31 July 2008 12:34:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 31 July 2008 12:34:38 GMT