use of org.springframework.web.socket.PongMessage in project spring-framework by spring-projects.
the class JettyWebSocketHandlerAdapter method onWebSocketFrame.
@OnWebSocketFrame
public void onWebSocketFrame(Frame frame) {
if (OpCode.PONG == frame.getOpCode()) {
ByteBuffer payload = frame.getPayload() != null ? frame.getPayload() : EMPTY_PAYLOAD;
PongMessage message = new PongMessage(payload);
try {
this.webSocketHandler.handleMessage(this.wsSession, message);
} catch (Exception ex) {
ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, ex, logger);
}
}
}
use of org.springframework.web.socket.PongMessage in project spring-framework by spring-projects.
the class WebSocketStompClientTests method handleWebSocketMessagePong.
@Test
public void handleWebSocketMessagePong() throws Exception {
connect().handleMessage(this.webSocketSession, new PongMessage());
verifyNoMoreInteractions(this.stompSession);
}
Aggregations