|
|
@@ -68,14 +68,16 @@ public class WebSocketServer {
|
|
|
String address = jsonObject.getString("address");
|
|
|
saveLocationData(userId, latitude, longitude,address);
|
|
|
log.info("服务端收到消息:{} ,主体:{}", message, userId);
|
|
|
- session.getAsyncRemote().sendText("服务端已收到信息:" + message);
|
|
|
+ sendMessage("服务端已收到信息:" +message);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@OnClose
|
|
|
public void onClose(@PathParam("userId") String userId, Session session) {
|
|
|
delStatus(userId);
|
|
|
sessionClientMap.remove(userId);
|
|
|
log.info("断联成功!");
|
|
|
+ sendMessage("断联成功!");
|
|
|
}
|
|
|
|
|
|
@OnError
|