pass parameter by endpoint, this is for websocket

使用了Java的字符串:
@ServerEndpoint("/chat/{room}")
public class MyEndpoint {
@OnMessage
public void receiveMessage(String message, @PathParam("room")String room) {
//. . .
}
}

原文地址:https://www.cnblogs.com/wblade/p/8597055.html