preemptive loading problem

Hi, I'm new in this mailing list and i'd like to thank you for all your
support and, of course, the libwww library.


I have got a problem, maybe you will be able to help me.
I wrote a program (with libwww) and, up to now, it seemed to work well on
linux and solaris (with a high speed connection)
Recently, i tryed to compile and run it under windows (at home with a low
speed connection) but it doesn't work anymore.

I use a method "load file" to load a file (in a preemptive way) at the
begining of the program.
under windows the method seems to do not wait for the file to be loaded and
return immediately (a null string).

why is this method not blocking ?
am i doing something wrong ?

/***************************************************************************
**************/
char *loadFile (char* url)
{
  HTRequest * request = HTRequest_new();
  HTChunk * chunk = NULL;
  
   
  printf("loading file : %s\n", url); 
  /* Set up the request and pass it to the Library */
  HTRequest_setOutputFormat(request, WWW_SOURCE);
  HTRequest_setPreemptive(request, YES);

  if (url) {
    char * cwd = HTGetCurrentDirectoryURL();
    char * absolute_url = HTParse(url, cwd, PARSE_ALL);
    HTAnchor * anchor = HTAnchor_findAddress(absolute_url);
    chunk = HTLoadAnchorToChunk(anchor, request);
    HT_FREE(absolute_url);
    HT_FREE(cwd);
  }

  /* Clean up the request */
  HTRequest_delete(request);

  if (chunk) {
    return HTChunk_toCString(chunk);
  }
  else {
    return NULL;
  }
}
/***************************************************************************
**************/

before using this method, i initialise the library like this :

/***************************************************************************
**************/


HTProfile_newNoCacheClient("Test", "1.0");
HTHost_setEventTimeout(25000);
HTPrint_setCallback(printer);
HTTrace_setCallback(tracer);
char * chaine = chargeFichier ("http://www.test.fr");

/***************************************************************************
**************/


I hope that you'll help me.

Thank you.

Francis.



-----------------------------------------------------------
This Mail has been checked for Viruses
Attention: Encrypted Mails can NOT be checked !

***

Diese Mail wurde auf Viren ueberprueft
Hinweis: Verschluesselte Mails koennen NICHT geprueft werden!
------------------------------------------------------------

Received on Tuesday, 6 March 2001 12:54:57 UTC