On 10/10/2012 21:29, Steffen Heil (Mailinglisten) wrote:
> Hi
> 
> I have a server with several websocket connections.
> (Or at least I will have at some time, see thread about ssl problems...)
> 
> Now just as in the chat example, I need to send some data from time to time
> so some (but not neccessarily all) of those connections.
> 
> Now, what happens if one of the clients stalls?
> 
> I suspect the server sending buffer will fill up and the server will
> eventually block sending to that connection.
> 
> Is there a way to prevent this?

With the current implementation? No. Writes are always blocking. They
should time out at which point you can drop the connection. But that
isn't going to be pretty.

> Can I detect if a sending buffer is full?

No.

> Can I set its size?

Yes.

> Can I register a notification to be notified when there is space in the
> sending buffer?

No.

The in-progress WebSocket JSR has an API that uses non-blocking IO
throughout so the answers to all of the above questions will become yes.

As the Tomcat implementation of this develops, it will almost certainly
be back-ported from Tomcat 8 to Tomcat 7.

Mark


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

Reply via email to