add sn in websocket up stream

This commit is contained in:
unknown
2020-10-27 19:28:03 +08:00
parent eea5688f15
commit 5d5ba33e91
3 changed files with 12 additions and 1 deletions

View File

@@ -8,6 +8,8 @@ public class WebSocketData<T> implements Serializable {
private int msgType;
private String sn;
private T t;
public long getSeq() {
@@ -26,6 +28,14 @@ public class WebSocketData<T> implements Serializable {
this.msgType = msgType;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public T getT() {
return t;
}

View File

@@ -114,6 +114,7 @@ public class WebSocketManager implements IMogoWebSocketManager, ISocketMsgSettin
WebSocketData webSocketData = new WebSocketData();
webSocketData.setSeq(System.currentTimeMillis());
webSocketData.setMsgType(listener.getUpLinkType().getMsgType());
webSocketData.setSn(Utils.getSn());
webSocketData.setT(body);
handlerThread.sendMsg(new Gson().toJson(webSocketData));
}