Delay when closing Tyrus WebSocket Sessions

572 views Asked by At

I'm building a service with Tyrus in Standalone Mode (Grizzly Server) where I send huge amounts of binary data via WS to a client. In my setup, the service is located behind a proxy server, so all data that is send, is first buffered at the proxy and after the proxy in the unix send buffer.

At a certain point in this transfer, I want to serverside close the connection. When i do so, the client gets the onClose event as soon as all the data waiting in the buffer and proxy is sent.

This behavior, where all messages are handled sequentiell and therefore the close message is the last one recieved by the client, is understandable.

But what I need is a way to close the WebSocket connection in realtime. Like the underlying TCP connection would close and therefor the client won't ever get the remaining data stored in the send buffer and proxy.

Does anyone got an idea how to create such an behavior with the Tyrus API?

0

There are 0 answers