users@grizzly.java.net

Re: Flushing output in http server

From: Peter Speck <speck_at_vitality.dk>
Date: Fri, 23 May 2008 16:01:28 +0200

On 22/05/2008, at 22:40, Jeanfrancois Arcand wrote:

> Grizzly buffer the bytes before flushing them to avoid unnecessary
> network operations. To achieve what you need, just do the following
> after the doWrite:
>
> response.action(ActionCode.ACTION_CLIENT_FLUSH,response);


That helped! Thanks.

I used this instead of the small buffer as I combine output into
bigger chunks and then flushes the output every 0.1 second (it's a
proxy server).

----
    - Peter Speck