Re: threading

At 18:16 17/03/1999 -0800, Andrew Wong wrote:

>Thanks for your prompt reply. I think there is a problem of the www-lib 
>maling list config. When I reply to a message from the list, the return
>address is not www-lib@w3.org, but the address of who has sent the message.

You have to respond to all recipients in order for the list to get included
so that sending mail to the list is a conscious decision.

>>Could be that you are using non-blocking sockets without going into the
>>eventloop. See the sample apps for how to do this.
>
>GDB trace showed that the failure caused at the very first call to connect()
>i.e. before HTLoadAnchor() returns. And therefore HTEventList_loop() in 
>showlinks.c doesn't even get chance to run.

I don't think it fails but rather it doesn't complete because you are using
non-blocking sockets. Non-blocking sockets (non-preemptive mode) require an
eventloop that libwww can use (this doesn't have to be the default libwww
eventloop:

	http://www.w3.org/Library/src/HTEvtLst.html

The only requirement is that it supports the interface described in

	http://www.w3.org/Library/src/HTEvent.html

If you are using GET and HEAD requests only then you can use blocking
sockets if you want in which case you don't need an eventloop. See the
description of preemptive vs non-preemptive profiles at

	http://www.w3.org/Library/src/HTProfil.html

Henrik
--
Henrik Frystyk Nielsen,
World Wide Web Consortium
http://www.w3.org/People/Frystyk

Received on Friday, 19 March 1999 12:10:20 UTC