Hi,

On Thu, Jul 28, 2016 at 3:19 PM, Viktor Szathmáry <[email protected]> wrote:
> Hi Simone,
>
> Thanks for the response! CometD sounds like an overkill for this particular
> use case (we’re talking about a  servlet with 200 lines of code :)

Perhaps.

> Asynchronous writes would work, but the part I’m missing is how can one
> force a flush to the client before filling up the buffer.

Ah, you can't with the Servlet APIs, there is no asynchronous flush primitive.
Note that the container can buffer the writes, so just the fact that
you wrote does not mean it went over the network.

That's another reason Server-Sent Events is not such a great solution.
For HelloWorlds kinda works, for all the rest it's very likely that it
will fall short.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to