On 1/7/12 3:18 PM, justphilmusic_at_googlemail.com wrote:
> Hello everybody!
>
>
> I've started to play around with Grizzly's WebSocket API and right now
> I'm about to build a small WebSocket based game.
>
> In order to maintain the connection between my server and the clients
> and to discover (mobile) network problems I would like to use a
> ping/pong mechanism since it is part of the WebSocket specification.
> (according to
> http://dev.w3.org/html5/websockets/#ping-and-pong-frames).
>
> By studying Grizzly's WebSocket related API docs I've discovered
> callback methods like onPing() and onPong() in the WebSocketApplication
> class. Consequently, I assumed that the WebSocket engine automatically
> performs ping/pong cycles between the connected clients and
> correspondingly invokes these callback methods, but I think I was
> wrong. I cannot get them to work in my own WebSocketApplication
> subclass.
>
> To cut a long story short, would somebody be so kind and provide a
> little example or some hints on how to get this feature to work?
>
> Thanks in advance + have a nice weekend! :-)
> Phil
What version of WebSockets is your client using?