[master] update socket version and extends config of heart beat interval
This commit is contained in:
@@ -94,6 +94,11 @@ public class MoGoAiCloudClientConfig {
|
||||
*/
|
||||
private String socketTechUrl;
|
||||
|
||||
/**
|
||||
* sdk中默认120秒,此处不设default=120
|
||||
*/
|
||||
private long heartBeatInterval;
|
||||
|
||||
/**
|
||||
* 是否打印日志
|
||||
*/
|
||||
@@ -286,6 +291,14 @@ public class MoGoAiCloudClientConfig {
|
||||
this.socketTechUrl = socketTechUrl;
|
||||
}
|
||||
|
||||
public long getHeartBeatInterval() {
|
||||
return heartBeatInterval;
|
||||
}
|
||||
|
||||
public void setHeartBeatInterval(long heartBeatInterval) {
|
||||
this.heartBeatInterval = heartBeatInterval;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前网络环境
|
||||
*
|
||||
@@ -522,6 +535,7 @@ public class MoGoAiCloudClientConfig {
|
||||
", passportUrl='" + passportUrl + '\'' +
|
||||
", socketBaseUrl='" + socketBaseUrl + '\'' +
|
||||
", socketTechUrl='" + socketTechUrl + '\'' +
|
||||
", heartBeatInterval='" + heartBeatInterval + '\'' +
|
||||
", isShowDebugLog=" + isShowDebugLog +
|
||||
", isShowNetDebugLog=" + isShowNetDebugLog +
|
||||
", isShowToastLog=" + isShowToastLog +
|
||||
|
||||
@@ -37,7 +37,7 @@ dependencies {
|
||||
implementation 'com.zhidao.socketsdk:socketsdk:2.1.4'
|
||||
|
||||
// socket-for-sdk 长链 http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=48956182 外部SDK版本
|
||||
api 'com.zhidao.socket:built-in-socket:1.0.31'
|
||||
api 'com.zhidao.socket:built-in-socket:1.0.35'
|
||||
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
|
||||
@@ -67,7 +67,8 @@ public class ThirdSocketManager implements Callback, ErrorCallback {
|
||||
.setDebug(cloudClientConfig.isShowDebugLog())
|
||||
.setCustomTechBaseUrl(cloudClientConfig.getSocketTechUrl())
|
||||
.setCustomBaseUrl(cloudClientConfig.getSocketBaseUrl())
|
||||
.setLocation(mLocation);
|
||||
.setLocation(mLocation)
|
||||
.setHeartBeat(cloudClientConfig.getHeartBeatInterval());
|
||||
SocketClient.getInstance().registerSocketCallback(this);
|
||||
SocketClient.getInstance().registerErrorCallback(this);
|
||||
SocketClient.getInstance().start(context);
|
||||
|
||||
@@ -33,7 +33,7 @@ SNAPSHOT_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-snapshots/
|
||||
USERNAME=xintai
|
||||
PASSWORD=xintai2018
|
||||
# 编译模式: false - 依赖本地版本, true - 依赖 maven 版本
|
||||
RELEASE=true
|
||||
RELEASE=false
|
||||
# AI CLOUD 云平台
|
||||
# 工具类
|
||||
MOGO_UTILS_VERSION=1.4.7.17
|
||||
|
||||
Reference in New Issue
Block a user