Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
李勇
/
McuClient
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
李勇
2017-08-15 12:33:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
98bb29e53206c79f3924ef6386f78d7a858a26f6
98bb29e5
1 parent
d2490b95
1.修改MCU的选点测速逻辑,如果测速失败,会从已有的列表中安顺序连接,不再随机选择
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
25 行增加
和
6 行删除
src/EngineEntrance.js
src/apes/ConferApe.js
src/EngineEntrance.js
查看文件 @
98bb29e
...
...
@@ -58,7 +58,7 @@ export default class MessageEntrance extends Emiter {
constructor
()
{
super
();
//sdk 信息
GlobalConfig
.
sdkVersion
=
"v1.7
4.0.20170814
"
;
GlobalConfig
.
sdkVersion
=
"v1.7
5.0.20170815
"
;
loger
.
warn
(
"sdkVersion:"
+
GlobalConfig
.
sdkVersion
);
//设置
...
...
@@ -1117,11 +1117,30 @@ export default class MessageEntrance extends Emiter {
GlobalConfig
.
MCUServerIP
=
_data
.
ip
||
""
;
GlobalConfig
.
MCUServerPort
=
_data
.
port
||
""
;
}
else
{
//随机选择一个
if
(
GlobalConfig
.
mcuListFinal
&&
GlobalConfig
.
mcuListFinal
.
length
>
0
)
{
let
index
=
parseInt
(
Math
.
random
()
*
GlobalConfig
.
mcuListFinal
.
length
);
GlobalConfig
.
MCUServerIP
=
GlobalConfig
.
mcuListFinal
[
index
].
ip
||
""
;
GlobalConfig
.
MCUServerPort
=
GlobalConfig
.
mcuListFinal
[
index
].
port
||
""
;
//如果当前没有设置过mcu的ip和端口随机选择一个
if
(
!
GlobalConfig
.
MCUServerIP
||
GlobalConfig
.
mcuListFinal
.
length
==
1
){
let
index
=
parseInt
(
Math
.
random
()
*
GlobalConfig
.
mcuListFinal
.
length
);
GlobalConfig
.
MCUServerIP
=
GlobalConfig
.
mcuListFinal
[
index
].
ip
||
""
;
GlobalConfig
.
MCUServerPort
=
GlobalConfig
.
mcuListFinal
[
index
].
port
||
""
;
}
else
{
//当前mcu已经有值,需要选择一个新的
for
(
let
i
=
0
;
i
<
GlobalConfig
.
mcuListFinal
.
length
;
i
++
){
if
(
GlobalConfig
.
MCUServerIP
==
GlobalConfig
.
mcuListFinal
[
i
].
ip
){
//获取下一个MCU
let
nextMcu
=
GlobalConfig
.
mcuListFinal
[
i
+
1
];
if
(
!
nextMcu
){
//如果下一个mcu不存在就使用第一个
nextMcu
=
GlobalConfig
.
mcuListFinal
[
0
];
}
if
(
nextMcu
){
GlobalConfig
.
MCUServerIP
=
nextMcu
.
ip
||
""
;
GlobalConfig
.
MCUServerPort
=
nextMcu
.
port
||
""
;
}
break
;
}
}
}
}
}
if
(
oldIp
&&
oldIp
!=
GlobalConfig
.
MCUServerIP
)
{
...
...
src/apes/ConferApe.js
查看文件 @
98bb29e
...
...
@@ -814,7 +814,7 @@ class ConferApe extends Ape {
thirdMessage
.
toNodeID
=
thirdBroadcastReceivePdu
.
peer
;
//loger.log("监听第三方消息通道消息->1", thirdMessage);
thirdMessage
.
message
=
this
.
_rCArrayBufferUtil
.
uint8ArrayToStr
(
thirdBroadcastReceivePdu
.
message
,
2
);
loger
.
log
(
"
监听
第三方消息通道消息->"
,
thirdMessage
);
loger
.
log
(
"
收到
第三方消息通道消息->"
,
thirdMessage
);
this
.
_emit
(
MessageTypes
.
RECEIVE_THIRD_MESSGAE
,
thirdMessage
);
if
(
this
.
thirdMessage
)
{
this
.
thirdMessage
.
sendMessageToParent
(
thirdMessage
.
message
);
...
...
请
注册
或
登录
后发表评论