Newer
Older
CosmosServer / src / test / java / WebSocketTest / WebSocket.java
package WebSocketTest;

import javax.websocket.OnMessage;
import javax.websocket.server.ServerEndpoint;

@ServerEndpoint("/WebSocket")
public class WebSocket {

    @OnMessage
    public String echo(String message) {
        System.out.println("メッセージを受信しました。:" + message);
        return message;
    }
}