Re: Anchors, Event Loop, Callback timeouts

Mikhail Grouchinski wrote:
> 
> Hi all,
> 
> I have several questions.
> 
> 1.
> How to avoid memory leaks with anchors.
> What is the best way of deleting them?
> If I use LoadToChunk does it create internal anchors?
> If I use FindAnchor then LoadAnchorToChunk
> when and how should I delete this Anchor.
> My application with LibWWW should work
> as a demon without restarts and serve hundreds of
> requests simultaneously.

I have added a new HTAnchor_clearAll which is a compromise - it doesn't
delete the anchor structure itself but all the metadata associated with
that anchor.
 
> 2.
> I create request, register callback addAfter,
> issue LoadToChunk and parse the data of
> chunk in a callback.
> But this callback is called ~30 sec later after
> request. If I manually issue the same request (by telnet) reply appears immediately. If I use only
> HTTP/1.0 requests I don't have this timeout

Run the code in verbose mode using protocol and core traces as described
in

	http://www.w3.org/Library/src/HTHome.html#Trace	

and see what it says.
 
> 3.
> How can I mix in one application simultaneous
> HTTP/1.0 HTTP/1.1 (pipelined and non-pipelined)
> requests. The variable ConnectionMode is not 'thread safe' if I change it it reflect other requests that are being processed

That is a good point and have been on the plate for some time but I
don't have time to dive into that now. The best thing is to add a
generic protocol flag to the request object and have the current HTTP
flag be the default flag which can be overridden on a pr request basis
as needed.
 
> 4.
> How can I issue HTTP/0.9 request?

Currently libwww only generates HTTP/0.9 reqs when forced to by the
server. There is no way to set it up to do that. You could of course
extend the connection mode flag above to support this.
 
> 5.
> On HP-UX when I install library as shared cc complains on HTextImp.h
> struct _HText{};
> cannot be empty

hmm, silly - do you need to stick in a bool or something?

Henrik

Received on Tuesday, 22 December 1998 15:18:18 UTC