On 23/09/2013 09:43, Remy Maucherat wrote:
> Hi Mark,
> 
> Unless I missed something, Websockets 1.0 on Servlet 3.1 upgrade doesn't
> do much flushing, so that the IS/OS used in upgrade must effectively
> just write immediately the data (and ensure it is really sent over the
> wire).

Correct. Unless batching is enabled, writes go immediately.

> I find that a bit weird, since during the design of Servlets 3.1, the
> idea was to retain buffering. Of course, upgrade was then added, char
> support was taken out of the new IO, and it should be feasible to use
> this sort of bufferless streams in upgraded mode. But that's a lot of
> assumptions, shouldn't the websockets implementation just flush ? In any
> case it would be good to have the buffer vs no buffer choice clarified
> for the upgraded mode [to be honest, I thought it was like the regular
> Servlet 3.1 IO mode, minus the HTTP transfer encodings].

Tomcat's implementation doesn't buffer upgraded streams at all.

Non-blocking IO with non-upgraded streams still uses the standard
buffering mechanisms.

I agree some clarification is required. When section 5.1 discusses
buffering, it does so in the context of the ServletResponse object so it
isn't immediately obvious how the buffer should be controlled (or even
if it should exist) in the upgraded scenario.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to