Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
colorEagleStdio
zoompipeline
提交
08b7ccdc
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,发现更多精彩内容 >>
提交
08b7ccdc
编写于
5月 02, 2014
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tested in Ubuntu 14.04
上级
8fbfa1fc
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
74 addition
and
66 deletion
+74
-66
ZoomPipeline_FuncSvr/ZoomPipeline_FuncSvr.pro
ZoomPipeline_FuncSvr/ZoomPipeline_FuncSvr.pro
+40
-40
ZoomPipeline_FuncSvr/smartlink/st_client_table.cpp
ZoomPipeline_FuncSvr/smartlink/st_client_table.cpp
+17
-3
ZoomPipeline_FuncSvr/smartlink/st_client_table.h
ZoomPipeline_FuncSvr/smartlink/st_client_table.h
+8
-3
ZoomPipeline_FuncSvr/smartlink/st_cross_svr_node.cpp
ZoomPipeline_FuncSvr/smartlink/st_cross_svr_node.cpp
+5
-12
ZoomPipeline_FuncSvr/smartlink/st_cross_svr_node.h
ZoomPipeline_FuncSvr/smartlink/st_cross_svr_node.h
+4
-8
未找到文件。
ZoomPipeline_FuncSvr/ZoomPipeline_FuncSvr.pro
浏览文件 @
08b7ccdc
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#-------------------------------------------------
#-------------------------------------------------
QT
+=
core
gui
network
sql
QT
+=
core
gui
network
sql
unix
:
QMAKE_CXXFLAGS
+=
-
std
=
c
++
11
greaterThan
(
QT_MAJOR_VERSION
,
4
)
:
QT
+=
widgets
greaterThan
(
QT_MAJOR_VERSION
,
4
)
:
QT
+=
widgets
TARGET
=
ZoomPipeline_FuncSvr
TARGET
=
ZoomPipeline_FuncSvr
...
...
ZoomPipeline_FuncSvr/smartlink/st_client_table.cpp
浏览文件 @
08b7ccdc
#include "st_client_table.h"
#include "st_client_table.h"
#include "st_clientnode_applayer.h"
#include "st_clientnode_applayer.h"
#include <assert.h>
#include <assert.h>
#include "st_cross_svr_node.h"
#include <functional>
namespace
SmartLink
{
namespace
SmartLink
{
using
namespace
std
::
placeholders
;
st_client_table
::
st_client_table
(
st_client_table
::
st_client_table
(
ZPNetwork
::
zp_net_Engine
*
NetEngine
,
ZPNetwork
::
zp_net_Engine
*
NetEngine
,
ZPTaskEngine
::
zp_pipeline
*
taskeng
,
ZPTaskEngine
::
zp_pipeline
*
taskeng
,
...
@@ -25,8 +28,11 @@ namespace SmartLink{
...
@@ -25,8 +28,11 @@ namespace SmartLink{
connect
(
m_pCluster
,
&
ZP_Cluster
::
zp_ClusterTerm
::
evt_NewSvrDisconnected
,
this
,
&
st_client_table
::
on_evt_NewSvrDisconnected
,
Qt
::
QueuedConnection
);
connect
(
m_pCluster
,
&
ZP_Cluster
::
zp_ClusterTerm
::
evt_NewSvrDisconnected
,
this
,
&
st_client_table
::
on_evt_NewSvrDisconnected
,
Qt
::
QueuedConnection
);
connect
(
m_pCluster
,
&
ZP_Cluster
::
zp_ClusterTerm
::
evt_RemoteData_recieved
,
this
,
&
st_client_table
::
on_evt_RemoteData_recieved
,
Qt
::
QueuedConnection
);
connect
(
m_pCluster
,
&
ZP_Cluster
::
zp_ClusterTerm
::
evt_RemoteData_recieved
,
this
,
&
st_client_table
::
on_evt_RemoteData_recieved
,
Qt
::
QueuedConnection
);
connect
(
m_pCluster
,
&
ZP_Cluster
::
zp_ClusterTerm
::
evt_RemoteData_transferred
,
this
,
&
st_client_table
::
on_evt_RemoteData_transferred
,
Qt
::
QueuedConnection
);
connect
(
m_pCluster
,
&
ZP_Cluster
::
zp_ClusterTerm
::
evt_RemoteData_transferred
,
this
,
&
st_client_table
::
on_evt_RemoteData_transferred
,
Qt
::
QueuedConnection
);
Reg_st_cross_svr_node
(
m_pCluster
);
m_pCluster
->
SetNodeFactory
(
std
::
bind
(
&
st_client_table
::
cross_svr_node_factory
,
this
,
_1
,
_2
,
_3
)
);
}
}
int
st_client_table
::
heartBeatingThrd
()
int
st_client_table
::
heartBeatingThrd
()
...
@@ -290,6 +296,14 @@ namespace SmartLink{
...
@@ -290,6 +296,14 @@ namespace SmartLink{
{
{
}
}
ZP_Cluster
::
zp_ClusterNode
*
st_client_table
::
cross_svr_node_factory
(
ZP_Cluster
::
zp_ClusterTerm
*
pTerm
,
QObject
*
psock
,
QObject
*
parent
)
{
st_cross_svr_node
*
pNode
=
new
st_cross_svr_node
(
pTerm
,
psock
,
parent
);
pNode
->
setClientTable
(
this
);
return
pNode
;
}
}
}
ZoomPipeline_FuncSvr/smartlink/st_client_table.h
浏览文件 @
08b7ccdc
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include <QList>
#include <QList>
#include <QMutex>
#include <QMutex>
#include <QMap>
#include <QMap>
#include <
hash
_map>
#include <
unordered
_map>
#include "../network/zp_net_threadpool.h"
#include "../network/zp_net_threadpool.h"
#include "../pipeline/zp_pipeline.h"
#include "../pipeline/zp_pipeline.h"
#include "./st_message.h"
#include "./st_message.h"
...
@@ -26,6 +26,7 @@ namespace SmartLink{
...
@@ -26,6 +26,7 @@ namespace SmartLink{
,
QObject
*
parent
=
0
);
,
QObject
*
parent
=
0
);
~
st_client_table
();
~
st_client_table
();
bool
regisitClientUUID
(
st_clientNode_baseTrans
*
);
bool
regisitClientUUID
(
st_clientNode_baseTrans
*
);
st_clientNode_baseTrans
*
clientNodeFromUUID
(
quint32
);
st_clientNode_baseTrans
*
clientNodeFromUUID
(
quint32
);
st_clientNode_baseTrans
*
clientNodeFromSocket
(
QObject
*
);
st_clientNode_baseTrans
*
clientNodeFromSocket
(
QObject
*
);
...
@@ -70,8 +71,12 @@ namespace SmartLink{
...
@@ -70,8 +71,12 @@ namespace SmartLink{
QString
m_largeFileFolder
;
QString
m_largeFileFolder
;
//cluster Nodes Map
//cluster Nodes Map
std
::
hash_map
<
quint32
,
QString
>
m_hash_remoteClient2SvrName
;
std
::
unordered_map
<
quint32
,
QString
>
m_hash_remoteClient2SvrName
;
//Cluster Node Factory
ZP_Cluster
::
zp_ClusterNode
*
cross_svr_node_factory
(
ZP_Cluster
::
zp_ClusterTerm
*
/*pTerm*/
,
QObject
*
/*psock*/
,
QObject
*
/*parent*/
);
signals:
signals:
...
...
ZoomPipeline_FuncSvr/smartlink/st_cross_svr_node.cpp
浏览文件 @
08b7ccdc
#include "st_cross_svr_node.h"
#include "st_cross_svr_node.h"
#include "../cluster/zp_clusterterm.h"
#include "../cluster/zp_clusterterm.h"
#include "st_client_table.h"
namespace
SmartLink
{
namespace
SmartLink
{
ZP_Cluster
::
zp_ClusterNode
*
st_cross_svr_node_factory
(
ZP_Cluster
::
zp_ClusterTerm
*
pTerm
,
QObject
*
psock
,
QObject
*
parent
)
{
return
new
st_cross_svr_node
(
pTerm
,
psock
,
parent
);
}
void
Reg_st_cross_svr_node
(
ZP_Cluster
::
zp_ClusterTerm
*
pTerm
)
{
pTerm
->
SetNodeFactory
(
st_cross_svr_node_factory
);
}
st_cross_svr_node
::
st_cross_svr_node
(
ZP_Cluster
::
zp_ClusterTerm
*
pTerm
,
QObject
*
psock
,
QObject
*
parent
)
st_cross_svr_node
::
st_cross_svr_node
(
ZP_Cluster
::
zp_ClusterTerm
*
pTerm
,
QObject
*
psock
,
QObject
*
parent
)
:
ZP_Cluster
::
zp_ClusterNode
(
pTerm
,
psock
,
parent
)
:
ZP_Cluster
::
zp_ClusterNode
(
pTerm
,
psock
,
parent
)
...
@@ -22,5 +11,9 @@ namespace SmartLink{
...
@@ -22,5 +11,9 @@ namespace SmartLink{
{
{
return
ZP_Cluster
::
zp_ClusterNode
::
deal_user_data
(
array
);
return
ZP_Cluster
::
zp_ClusterNode
::
deal_user_data
(
array
);
}
}
void
st_cross_svr_node
::
setClientTable
(
st_client_table
*
table
)
{
this
->
m_pClientTable
=
table
;
}
}
}
ZoomPipeline_FuncSvr/smartlink/st_cross_svr_node.h
浏览文件 @
08b7ccdc
...
@@ -2,22 +2,18 @@
...
@@ -2,22 +2,18 @@
#define ST_CROSS_SVR_NODE_H
#define ST_CROSS_SVR_NODE_H
#include "../cluster/zp_clusternode.h"
#include "../cluster/zp_clusternode.h"
namespace
SmartLink
{
namespace
SmartLink
{
class
st_client_table
;
ZP_Cluster
::
zp_ClusterNode
*
st_cross_svr_node_factory
(
ZP_Cluster
::
zp_ClusterTerm
*
/*pTerm*/
,
QObject
*
/*psock*/
,
QObject
*
/*parent*/
);
void
Reg_st_cross_svr_node
(
ZP_Cluster
::
zp_ClusterTerm
*
pTerm
);
class
st_cross_svr_node
:
public
ZP_Cluster
::
zp_ClusterNode
class
st_cross_svr_node
:
public
ZP_Cluster
::
zp_ClusterNode
{
{
Q_OBJECT
Q_OBJECT
public:
public:
st_cross_svr_node
(
ZP_Cluster
::
zp_ClusterTerm
*
pTerm
,
QObject
*
psock
,
QObject
*
parent
);
st_cross_svr_node
(
ZP_Cluster
::
zp_ClusterTerm
*
pTerm
,
QObject
*
psock
,
QObject
*
parent
);
void
setClientTable
(
st_client_table
*
table
);
protected:
protected:
//!virtual functions, dealing with the user-defined operations.
//!virtual functions, dealing with the user-defined operations.
virtual
bool
deal_user_data
(
const
QByteArray
&
);
virtual
bool
deal_user_data
(
const
QByteArray
&
);
protected:
st_client_table
*
m_pClientTable
;
};
};
}
}
#endif // ST_CROSS_SVR_NODE_H
#endif // ST_CROSS_SVR_NODE_H
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录