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


From: Brian G. Rhodes <brhodes@visualcircuits.com>
Date: Sat, 25 Sep 2004 22:30:04 -0500
To: www-lib@w3.org
Message-Id: <1096169403.4131.12.camel@manowar.linespeed.net>

Is there a way to control the timeout on retrieving a file such as

HTRequest *request = 0;
  struct     stat fstat;
  request = HTRequest_new();  

  HTRequest_addConnection(request, "close", "");

  debug("libwww.c", "saving %s to %s...\n", src, dst);

  if ((HTLoadToFile(src, request, dst) != YES))
      debug("libwww.c", "cannot download file %s\n", src);
      return 0;
  debug("libwww.c", "request loop\n");

  stat(dst, &fstat);
  debug("libwww.c", "saved %s (%llu bytes)\n", src, fstat.st_size);

  if (access(dst, F_OK) || !(fstat.st_size))
    return 0;

  return fstat.st_size;

HTHost_setEventTimeout does not seem to affect this.  I would like to
limit the attempt to a couple seconds.  That timeout is fine once the
event loop runs, but HTLoadToFile is blocking for about 60 seconds.
What am I missing?
Received on Sunday, 26 September 2004 03:23:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:56 UTC