The Jetty WebSocket API in Jetty 9.0.x is not an implementation of the
JSR-356 standard (aka the javax.websocket namespace).
We have been involved in that standard and spec and have an implementation
of our own in the jetty-9.1 branch (its mostly complete at the moment).
Now, how to see a PING or PONG data frame with the Jetty API...
@OnWebSocketFrame<http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/websocket/api/annotations/OnWebSocketFrame.html>
public void
onFrame(Frame<http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/websocket/api/extensions/Frame.html>frame)
{
if(frame.getType() ==
Type.PONG<http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/websocket/api/extensions/Frame.Type.html>)
{
// do your processing of PONG
}
}
Hope this helps
--
Joakim Erdfelt <[email protected]>
webtide.com <http://www.webtide.com/>
Developer advice, services and support
from the Jetty & CometD experts
eclipse.org/jetty - cometd.org
On Wed, Jun 26, 2013 at 7:57 AM, Verachten Bruno <[email protected]> wrote:
> Hello all,
>
> I am trying to get the ping/pong working, but I just don't know if the
> client sends the pong back.
> I tried to cast a Jetty websocket session into a
> java.websocket.session, but that's wrong.
> How can I add a message handler (to handle the pong response) to a
> Jetty websocket session?
>
> Thanks in advance,
> --
> Bruno Verachten
> _______________________________________________
> jetty-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users