Merge branch '1.2.x'
This commit is contained in:
@@ -27,7 +27,7 @@ public class ReverseWebSocketEndpoint {
|
||||
|
||||
@OnMessage
|
||||
public void handleMessage(Session session, String message) throws IOException {
|
||||
session.getBasicRemote().sendText(
|
||||
"Reversed: " + new StringBuilder(message).reverse());
|
||||
session.getBasicRemote()
|
||||
.sendText("Reversed: " + new StringBuilder(message).reverse());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public class SnakeWebSocketHandler extends TextWebSocketHandler {
|
||||
public void afterConnectionClosed(WebSocketSession session, CloseStatus status)
|
||||
throws Exception {
|
||||
SnakeTimer.removeSnake(this.snake);
|
||||
SnakeTimer.broadcast(String.format("{'type': 'leave', 'id': %d}",
|
||||
Integer.valueOf(this.id)));
|
||||
SnakeTimer.broadcast(
|
||||
String.format("{'type': 'leave', 'id': %d}", Integer.valueOf(this.id)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user