RE: Open more than one HTTP request to a host?

"Sinha, Raj (Raj)" <[email protected]>
Newsgroups gmane.comp.lib.libwww
Message-ID <8CA1128D59AD27429985B397118CEDDF019E30E6@nj7460avexu1.global.avaya.com>
This is great I see a lot of activity and some great email threads.

So I guess now is a good time to ask questions. For a beginner like me
who is in very preliminary stages of project I would like to know if I
can use the Libwww to write a Web client and also use it as a server.
For example I would like to accept HTTP POSTS made from a form on port
80 and also use the same code for to write a Web client.

I saw a example of a mini server(I think it was taken out...) but also
some corresponding email advising not to use it. Don't know why. Any
updates or suggestions.... 

Raj Sinha
 


-----Original Message-----
From: Alec H. Peterson [mailto:[email protected]] 
Sent: Wednesday, May 07, 2003 11:25 AM
To: [email protected]
Subject: Re: Open more than one HTTP request to a host?



> I think so, yes, at least for HTTP requests to the same port. However,

> IMHO this is a good decision, at least for pipelined HTTP hosts. 
> (FTP/HTTP1.0 is a different matter.)
>
> As always with libwww, it's probably possible to play some dirty 
> tricks to get around the limitation. For this, you somehow need to 
> fool HTHost_new() into creating another host object. For example, it 
> might be possible just to append "." to the hostname for a second 
> connection.

It's worth pointing out that I tried something similar to this that I 
_thought_ would work, but it caused some problems.  I was adding a
random 
integer to the hash value from 0 to 3 % the hash table size.  It seemed
to 
work at first, but for some sites it seemed to get into a deadlock for
some 
reason, where it was selecting on no file descriptors with no timeout.

I'm running in HTTP/1.1 mode with no pipelining.

I'd love to be able to get this to work with an arbitrary number of 
connections, but if the solution of appending a "." works that would be 
nice to just get double the throughput.

Alec

--
Alec H. Peterson -- [email protected]
Chief Technology Officer
Catbird Networks, http://www.catbird.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.