At 23:07 3/4/2007, you wrote:
But since you can't send the response without finishing the reading of the input stream - the entire question doesn't seem to make sense.

If the input pipe is slow (ie: cellphone with slow pipe) and you are sending a transaction where the first part of it initiates a big operation (like a database lookup) the lookup can be happening while the rest of the data is still being read in. ie: it is useful to be able to read input in small chunks as it comes in. And the client can be tuned to chunk appropriately for the transaction(s).

available() may work for this depending on buffering scheme of tomcat's protocol handler.

On writing the reply if you call "flushBuffer()" it will dispatch whatever is in the buffer (HTTP chunks as ip packets) to the client even if input reading is incomplete. Doing so if you can, will reduce round trip latency and the time your socket is consumed. A gross example would be a transaction to process a large file and return it to the client. If the processing was serial then the client could be receiving the return file even before it had finished sending the source file.

It seems the servelet API was not upgraded to handle incremental chunks in a flexible general manner when it was added in HTTP1.1. This is irrespective of how chunks may be juggled by any proxy or other front end. I am simply dealing with how you *can* handle them on the receiving end.

PK




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to