I have a websocket server deployed on Glassfish 4. I try to use ping/pong. My plan is to send periodically pings from the server to the clients and if they do not pong back I wan to close the conenction. Unfortunately there seem not do be any
@OnMessage
public void onMessage(PingMessage pingMessage)
within the javax.websocket.ClientEndpoint or ServerEndpoint.
Or any other way to react ping messages. For some very strange reasons, when I deploy the server inside Eclipse I receive pong messages even though I never implemented it inside the client. But when I deploy it using the glassfish maven plugin on my server, I dont receive any pongs anymore.
It turned out that the server part was not fully deployed which caused the wierd difference between ecplise and the server. But anyway, it is still strange that you cannot handle the ping messages yourself. Imagine that you want to handle it or use it for sending status or something...