tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Delbecq <de...@oma.be>
Subject Re: Rephrased: Maximum number of simultaneous HTTP connections
Date Mon, 03 Apr 2006 13:33:31 GMT

>
> Here a diagram:
>
> Client sends GET -> Server
> Server sends HEADERS (Content Encoding: Chunked) -> Client
> Server sends chunks -> Client
> Client displays them whenever they arrive.

Just one point. If your 'client' is a classical browser it won't work
like this out of the box, for the simple reason you have no guarantee
the client will do any display before it receive </html>
There are provisition in http standard for a progressive display of a
page. I can't remember like that the references in http 1.1 specs, just
give it a look. It's based on a server pushing of page refreshes on a
keep-alive connection. But it need special headers.

>
> I could just remember the HttpRespone Objects and use one thread,
> which gets, when new messages arrive in the queue. The thread then
> could println() them to all he HttpRespones. This would save me all
> the Threads. Hmm, sounds good, or have I missed somthing?!


Yes, one thing, when doGet() returns, the container *could* close the
connection. (This is tomcat internal dependent and should not be 
assumed as deterministic).


As a side note, as stated by other people already, you should probably
write your own standalone application if you intend to keep all
connections alive for your chat.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message