W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1999

Re: Getting out of HTEventList_loop()

From: Michael Saunders <michael@amtec.com>
Date: Wed, 09 Jun 1999 17:19:51 -0700
Message-ID: <375F04A7.9007726C@amtec.com>
To: www-lib@w3.org, gstreet@vninet.com
Raffaele Sena wrote:
> > control seems to stay in HTEventList_loop().  Is there something else
> > I can put in the terminate handler that will say "exit libwww stuff and
> > return to the calling function, without exiting the application?"
> >
> > I appreciate any help.  Thanks,
> >
>     Yes, you have to call HTEventList_stopLoop() at the end of the terminate
>     handler. That will make the call to HTVentList_loop() to terminate.


It sounds like we are both attempting to use libwww in similar ways. I
have been trying to integrate the capabilities of the library into an
existing application in such a way that I have libwww executing in it's
own event loop while transfering a file and afterwards exiting the
event loop and returning to my main X event loop. I perform X flushes
during the progress callbacks to make sure that the underlying application
is repainted and that the progress dialog is updated during the transfer.

I have experience some pretty large obsticles attempting to use this
library which has been quite disappointing. I am not sure if it is
the way in which I am using it or if it really is buggy. I discovered
the following problems:

	1) Exiting the event loop after interrupting a transfer makes
	the library unusable upon subsequent transfers using the
	default event loop in HTEvtLst.c. I followed the documentation
	and called the HTHost_killPipe as instructed but it the library
	doesn't seem to clean up correctly. Subsequent transfers
	using HTLoadToFile stop immediately due to some read error
	which causes the library to kill the pipe.

	2) I had to make code modifications to the HTEventList_loop function
	to make sure that the HTEndLoop flag was reset at all exit
	points in the function.

	3) I tried reinitializing the library and cleaning it up completely
	before and after each request but I discovered that if perform
	several subsequent download and uploads using HTLoadToFile and
	HTPutDocumentAnchor the library crashes.

Good luck to you. If you can figure it out please let me know as I
would greatly appreciate hearing about your experiences.


"Customize Tecplot with the Add-On Developer's Kit,
ask me how."
Michael Saunders
Senior Programmer
Amtec Engineering, Inc.
13920 SE Eastgate Way, Suite 220
Bellevue WA  98005

Tel: 425.653.1200 Ext. 238
Fax: 425.653.9200
Web: http://www.amtec.com
Received on Wednesday, 9 June 1999 20:20:06 UTC

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