Commit dad872b8 by zhanghj

V1.4.0--优化websocket推送

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@23663 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent cfa4beb1
......@@ -84,7 +84,7 @@ public class MyWebSocket {
* @param message 客户端发送过来的消息*/
@OnMessage
public void onMessage(String message, Session session) throws Exception {
this.session = session;
/* this.session = session;
message = "来自客户端的消息:" + message;
log.info(message);
try {
......@@ -93,7 +93,7 @@ public class MyWebSocket {
} catch (Exception e) {
log.error("onMessage方法异常"+e.toString());
e.printStackTrace();
}
}*/
//群发消息
// sendInfo("群发消息"+message);
}
......
......@@ -16,7 +16,7 @@ Welcome<br/>
//判断当前浏览器是否支持WebSocket
if('WebSocket' in window){
websocket = new WebSocket("ws://localhost:8087/carservice/usercenter/websocket/739");
websocket = new WebSocket("wss://devwx.glsx.com.cn/carservice/usercenter/websocket/739");
}
else{
alert('Not support websocket')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!