Skip to content

Commit

Permalink
添加设置自定义心跳间隔的接口
Browse files Browse the repository at this point in the history
  • Loading branch information
heavyrian2012 committed Jan 10, 2025
1 parent 5e79684 commit a3e10fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/wfc/client/wfc.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ export class WfcManager {
return impl.connect(userId, token);
}

/**
* 设置自定义心跳时长。仅当特殊场景下才需要使用,一般情况下不要设置。
* @param {int} sec 心跳的间隔,单位是秒,大于等于30秒,小于等于300秒。
*/
setHeartBeatInterval(int sec) {
impl.setHeartBeatInterval(sec);
}

/**
* 设置代理,只支持socks5代理
*
Expand Down
4 changes: 4 additions & 0 deletions src/wfc/proto/proto.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ class WfcImpl {
// self.test();
}

setHeartBeatInterval(int sec) {
protoProxy.invoke('setHeartBeatInterval', sec);
}

setProxyInfo(host, ip, port, username, password) {
protoProxy.invoke('setProxyInfo', host, ip, port, username, password);
}
Expand Down

0 comments on commit a3e10fe

Please sign in to comment.