remove unuse code and add interface

This commit is contained in:
zhongchao
2021-02-04 18:12:24 +08:00
parent 8906d03d08
commit f05837b653
4 changed files with 8 additions and 5 deletions

View File

@@ -181,15 +181,13 @@ public class SocketHandler {
webSocketData.setSeq(computeSendMsgTime());
webSocketData.setSn(MoGoAiCloudClient.getInstance().getAiCloudClientConfig().getSn());
webSocketData.setData(GsonUtil.jsonFromObject(content));
String msg = GsonUtil.jsonFromObject(webSocketData);
int msgType = LOW_FREQUENCY_CHANNEL_ID;
if (cloudLocationInfo.size() > 2) {
msgType = HIGH_FREQUENCY_CHANNEL_ID;
}
MsgBody msgBody = new MsgBody();
msgBody.msgType(msgType);
msgBody.content(msg);
msgBody.content(webSocketData);
SocketManager.getInstance().sendMsg(mAppId, HEADER_TYPE, msgBody, msgId -> {
for (IMogoCloudOnMsgListener listener : onMsgListenerList) {
if (listener != null) {