extends socket interface
This commit is contained in:
@@ -68,7 +68,7 @@ public class LiveStreamManagerImpl implements ILiveStreamManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMsgReceived(CommandModel obj) {
|
||||
public void onMsgReceived(int msgType, CommandModel obj) {
|
||||
Logger.i(TAG, "onMsgReceived: obj=" + obj + " systemClock :" + SystemClock.elapsedRealtime() + " SystemTime : " + System.currentTimeMillis());
|
||||
livePushHandler(obj.getType(), obj.getVideoChannel());
|
||||
}
|
||||
|
||||
@@ -14,7 +14,8 @@ public interface IMogoCloudSocketOnMessageListener<T> {
|
||||
|
||||
/**
|
||||
* 消息接收回调
|
||||
* @param msgType 消息类型
|
||||
* @param obj T 业务bean数据
|
||||
*/
|
||||
void onMsgReceived(T obj);
|
||||
void onMsgReceived(int msgType, T obj);
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ import android.support.annotation.NonNull;
|
||||
|
||||
import com.google.protobuf.ByteString;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.mogo.cloud.GsonUtil;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.cloud.GsonUtil;
|
||||
import com.mogo.cloud.utils.logger.Logger;
|
||||
import com.zhidao.locupload.Platform;
|
||||
import com.zhidao.ptech.connsvr.commom.protocol.MogoCommon;
|
||||
@@ -147,7 +147,7 @@ public class SocketManager implements IMogoCloudSocketManager, Callback {
|
||||
}
|
||||
if (listener != null) {
|
||||
Logger.d(TAG, "received msgId = %s, content = %s", msgId, payload.getPayload().toStringUtf8());
|
||||
listener.onMsgReceived(object);
|
||||
listener.onMsgReceived(msgType, object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,20 +30,20 @@ PASSWORD=xintai2018
|
||||
RELEASE=true
|
||||
# AI CLOUD 云平台
|
||||
# 工具类
|
||||
MOGO_UTILS_VERSION=1.0.30-SNAPSHOT
|
||||
MOGO_UTILS_VERSION=1.0.31-SNAPSHOT
|
||||
# 网络请求
|
||||
MOGO_NETWORK_VERSION=1.0.30-SNAPSHOT
|
||||
MOGO_NETWORK_VERSION=1.0.31-SNAPSHOT
|
||||
# 网络DNS
|
||||
MOGO_HTTPDNS_VERSION=1.0.30-SNAPSHOT
|
||||
MOGO_HTTPDNS_VERSION=1.0.31-SNAPSHOT
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.0.30-SNAPSHOT
|
||||
MOGO_PASSPORT_VERSION=1.0.31-SNAPSHOT
|
||||
# 常链接
|
||||
MOGO_SOCKET_VERSION=1.0.30-SNAPSHOT
|
||||
MOGO_SOCKET_VERSION=1.0.31-SNAPSHOT
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.0.30-SNAPSHOT
|
||||
MOGO_REALTIME_VERSION=1.0.31-SNAPSHOT
|
||||
# 探路,道路事件发布,获取
|
||||
MOGO_TANLU_VERSION=1.0.30-SNAPSHOT
|
||||
MOGO_TANLU_VERSION=1.0.31-SNAPSHOT
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.0.30-SNAPSHOT
|
||||
MOGO_LIVE_VERSION=1.0.31-SNAPSHOT
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.0.30-SNAPSHOT
|
||||
MOGO_TRAFFICLIVE_VERSION=1.0.31-SNAPSHOT
|
||||
|
||||
@@ -3,11 +3,13 @@ package com.mogo.realtime.socket;
|
||||
import android.content.Context;
|
||||
import android.os.SystemClock;
|
||||
|
||||
import com.mogo.cloud.GsonUtil;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.socket.IMogoCloudSocketOnMessageListener;
|
||||
import com.mogo.cloud.socket.MsgBody;
|
||||
import com.mogo.cloud.socket.SocketManager;
|
||||
import com.mogo.cloud.socket.WebSocketData;
|
||||
import com.mogo.cloud.utils.logger.Logger;
|
||||
import com.mogo.realtime.core.SimpleLocationCorrectStrategy;
|
||||
import com.mogo.realtime.entity.ADASRecognizedResult;
|
||||
import com.mogo.realtime.entity.CloudLocationInfo;
|
||||
@@ -16,8 +18,6 @@ import com.mogo.realtime.entity.MogoSnapshotSetData;
|
||||
import com.mogo.realtime.entity.OnePerSecondSendContent;
|
||||
import com.mogo.realtime.spi.RealTimeProviderImp;
|
||||
import com.mogo.realtime.util.MortonCode;
|
||||
import com.mogo.cloud.GsonUtil;
|
||||
import com.mogo.cloud.utils.logger.Logger;
|
||||
import com.zhidao.ptech.connsvr.protocol.MogoConnsvr;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -94,8 +94,7 @@ public class SocketHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMsgReceived(WebSocketData webSocketData) {
|
||||
int msgType = webSocketData.getMsgType();
|
||||
public void onMsgReceived(int msgType, WebSocketData webSocketData) {
|
||||
if (msgType == MSG_TYPE_ACK.getMsgType()) {
|
||||
if (webSocketData.getUtcTime() > 0) {
|
||||
serverTime = webSocketData.getUtcTime();
|
||||
|
||||
Reference in New Issue
Block a user