Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
colorEagleStdio
zoompipeline
提交
de8932d0
zoompipeline
项目概览
colorEagleStdio
/
zoompipeline
通知
181
Star
12
Fork
4
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
zoompipeline
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
de8932d0
编写于
5月 02, 2014
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add some works for cross-svr-data trans
上级
be4ede43
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
33 addition
and
5 deletion
+33
-5
ZoomPipeline_FuncSvr/smartlink/st_client_table.cpp
ZoomPipeline_FuncSvr/smartlink/st_client_table.cpp
+22
-0
ZoomPipeline_FuncSvr/smartlink/st_client_table.h
ZoomPipeline_FuncSvr/smartlink/st_client_table.h
+4
-0
ZoomPipeline_FuncSvr/smartlink/st_clientnode_applayer.cpp
ZoomPipeline_FuncSvr/smartlink/st_clientnode_applayer.cpp
+6
-4
ZoomPipeline_FuncSvr/smartlink/st_cross_svr_node.h
ZoomPipeline_FuncSvr/smartlink/st_cross_svr_node.h
+1
-1
未找到文件。
ZoomPipeline_FuncSvr/smartlink/st_client_table.cpp
浏览文件 @
de8932d0
...
...
@@ -384,5 +384,27 @@ namespace SmartLink{
m_mutex_cross_svr_map
.
unlock
();
emit
evt_Message
(
this
,
tr
(
"Removed remote %1 client uuid(s) from svr "
).
arg
(
nUUIDs
)
+
svrname
);
}
void
st_client_table
::
cross_svr_send_data
(
const
QString
&
svrname
,
const
QByteArray
&
arr
)
{
int
nMsgLen
=
sizeof
(
STCROSSSVR_MSG
::
tag_msgHearder
);
QByteArray
array
(
nMsgLen
,
0
);
STCROSSSVR_MSG
*
pMsg
=
(
STCROSSSVR_MSG
*
)
array
.
data
();
pMsg
->
header
.
Mark
=
0x4567
;
pMsg
->
header
.
version
=
1
;
pMsg
->
header
.
messageLen
=
arr
.
size
();
pMsg
->
header
.
mesageType
=
0x03
;
array
.
append
(
arr
);
m_pCluster
->
SendDataToRemoteServer
(
svrname
,
array
);
}
QString
st_client_table
::
cross_svr_find_uuid
(
quint32
uuid
)
{
QString
svr
=
""
;
m_mutex_cross_svr_map
.
lock
();
if
(
m_hash_remoteClient2SvrName
.
find
(
uuid
)
!=
m_hash_remoteClient2SvrName
.
end
())
svr
=
m_hash_remoteClient2SvrName
[
uuid
];
m_mutex_cross_svr_map
.
unlock
();
return
svr
;
}
}
ZoomPipeline_FuncSvr/smartlink/st_client_table.h
浏览文件 @
de8932d0
...
...
@@ -52,6 +52,10 @@ namespace SmartLink{
void
cross_svr_del_uuids
(
const
QString
&
svrname
,
quint32
*
pUUIDs
,
int
nUUIDs
);
//Tell remote servers of uuid-change
void
broadcast_client_uuid
(
quint32
uuid
,
bool
bActive
);
//Trans user Data
void
cross_svr_send_data
(
const
QString
&
svrname
,
const
QByteArray
&
arr
);
//Server Name find
QString
cross_svr_find_uuid
(
quint32
uuid
);
protected:
//This list hold dead nodes that still in task queue,avoiding crash
...
...
ZoomPipeline_FuncSvr/smartlink/st_clientnode_applayer.cpp
浏览文件 @
de8932d0
...
...
@@ -209,12 +209,14 @@ namespace SmartLink{
st_clientNode_baseTrans
*
destin_node
=
m_pClientTable
->
clientNodeFromUUID
(
m_currentHeader
.
destin_id
);
if
(
destin_node
==
NULL
)
{
//need further dev, insert into db, or catched on disk.
//destin client is un-reachable, or in another function server.
//need server-to-server channels to re-post this message.
emit
evt_Message
(
this
,
tr
(
"Destin ID "
)
+
QString
(
"%1"
).
arg
(
m_currentHeader
.
destin_id
)
+
tr
(
" is not currently logged in."
));
QString
svr
=
m_pClientTable
->
cross_svr_find_uuid
(
m_currentHeader
.
destin_id
);
if
(
svr
.
length
()
<=
0
)
emit
evt_Message
(
this
,
tr
(
"Destin ID "
)
+
QString
(
"%1"
).
arg
(
m_currentHeader
.
destin_id
)
+
tr
(
" is not currently logged in."
));
else
m_pClientTable
->
cross_svr_send_data
(
svr
,
m_currentBlock
);
//Do Nothing
}
else
{
...
...
ZoomPipeline_FuncSvr/smartlink/st_cross_svr_node.h
浏览文件 @
de8932d0
...
...
@@ -18,7 +18,7 @@ namespace SmartLink{
protected:
st_client_table
*
m_pClientTable
;
//Current Message Offset, according to m_currentHeader
int
m_currStMegSize
;
quint32
m_currStMegSize
;
//Current un-procssed message block.for large blocks,
//this array will be re-setted as soon as some part of data has been
//dealed, eg, send a 200MB block, the 200MB data will be splitted into pieces
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录