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

2
.idea/misc.xml generated
View File

@@ -4,7 +4,7 @@
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
<groovy codeStyle="LEGACY" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="SuppressionsComponent">

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));
}