websocket getAsyncRemote()和getBasicRemote()区别
最近项目中要定时向前台web页面推送消息,便用websocket来做消息推送,websocket session发送文本消息有两个方法:getAsyncRemote()和getBasicRemote() 同事推荐使用getAsyncRemote()这个方法,网上找了下解释:就是getAsyncRemote是非阻塞式的,getBasicRemote是阻塞式的,表示不懂。推送消息的过程中遇到了一个b
原创
2016-11-22 16:56:15 ·
57088 阅读 ·
11 评论