Re: Intercepting WebSocket ping messages

2017-03-31 Thread Mark Thomas
On 31/03/17 15:03, Robert Lewis wrote: > We have a Server <-> Client connection. The client periodically sends pings > to the server, and Tomcat will respond with a sendPong() on a container > thread, but the same instance of WsRemoteEndpointImplServer we are actively > sending writes on. WsRemoteE

Re: Intercepting WebSocket ping messages

2017-03-31 Thread Robert Lewis
We have a Server <-> Client connection. The client periodically sends pings to the server, and Tomcat will respond with a sendPong() on a container thread, but the same instance of WsRemoteEndpointImplServer we are actively sending writes on. WsRemoteEndpointImplServer.doWrite() does not seem threa

Re: Intercepting WebSocket ping messages

2017-03-31 Thread Mark Thomas
On 30/03/17 21:13, Robert Lewis wrote: > Is there a way to intercept a ping message to send a pong? The API doesn't support this. > I need to do this synchronize sends to the endpoint. Could you clarify your requirement? Tomcat should handle pong messages automatically for you (as required by t

Intercepting WebSocket ping messages

2017-03-30 Thread Robert Lewis
Is there a way to intercept a ping message to send a pong? I need to do this synchronize sends to the endpoint. I tried session.addMessageHandler(new javax.websocket.MessageHandler.Whole() { @Override public void onMessage(PongMessage message) { Sy