1、功能:服务器主动向客户端发送消息
2、服务器端:继承AbstractWebSocketHandler, 实现handleTextMessage方法,从客户端端发送的消息会调起handleTextMessage方法。
客户端:注册websocket的onmessage消息,能接收到服务器端发送的消息。
产品对比及优缺点:https://www.cnblogs.com/liudaya/p/13173582.html
1、功能:服务器主动向客户端发送消息
2、服务器端:继承AbstractWebSocketHandler, 实现handleTextMessage方法,从客户端端发送的消息会调起handleTextMessage方法。
客户端:注册websocket的onmessage消息,能接收到服务器端发送的消息。
产品对比及优缺点:https://www.cnblogs.com/liudaya/p/13173582.html