I have a STOMP over websocket client server implementation. I want to test my java websocket client implemented using javax websocket on eclipse jetty for different websocket errors that can come. Is there a websocket simulator that can send different websocket error codes that I wish to test ? My websocket server is implemented using spring websockets.
Asked
Active
Viewed 422 times
1
-
I tried creating custom sub-protocol websocket handler and extending it from SubProtocolWebSocketHandler class as suggested in this post [link]http://stackoverflow.com/questions/28552033/disconnect-client-session-from-spring-websocket-stomp-server. In the custom sub-protocol websocket handler overrided afterConnectionEstablished method and once I got access to WebSocketSession object tried session.close( CloseStatus.NO_CLOSE_FRAME ); i.e 1006 But on the client side I got CloseReason[1002].Why is there a difference in the error code sent by server (1006) and the CloseReason on the client (1002) – vibhuti pithwa Mar 27 '16 at 19:44