[master] update socket version and extends config of heart beat interval

This commit is contained in:
zhongchao
2023-11-03 17:08:36 +08:00
parent 3b84bd4bac
commit 5d42576fc3
4 changed files with 18 additions and 3 deletions

View File

@@ -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 +

View File

@@ -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)) {

View File

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

View File

@@ -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