Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
colorEagleStdio
zoompipeline
提交
569f27b8
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 搜索 >>
提交
569f27b8
编写于
4月 27, 2014
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add some method to auto-connect to other svrs.
上级
68559719
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
103 addition
and
75 deletion
+103
-75
ZoomPipeline_FuncSvr/ZoomPipeline_FuncSvr_zh_CN.ts
ZoomPipeline_FuncSvr/ZoomPipeline_FuncSvr_zh_CN.ts
+76
-48
ZoomPipeline_FuncSvr/cluster/zp_clusterterm.cpp
ZoomPipeline_FuncSvr/cluster/zp_clusterterm.cpp
+1
-1
ZoomPipeline_FuncSvr/network/zp_net_threadpool.cpp
ZoomPipeline_FuncSvr/network/zp_net_threadpool.cpp
+21
-21
ZoomPipeline_FuncSvr/network/zp_net_threadpool.h
ZoomPipeline_FuncSvr/network/zp_net_threadpool.h
+1
-1
ZoomPipeline_FuncSvr/network/zp_netlistenthread.cpp
ZoomPipeline_FuncSvr/network/zp_netlistenthread.cpp
+3
-3
ZoomPipeline_FuncSvr/network/zp_nettransthread.cpp
ZoomPipeline_FuncSvr/network/zp_nettransthread.cpp
+1
-1
未找到文件。
ZoomPipeline_FuncSvr/ZoomPipeline_FuncSvr_zh_CN.ts
浏览文件 @
569f27b8
...
...
@@ -587,21 +587,21 @@
<
message
>
<
location
filename
=
"
zpmainframe.ui
"
line
=
"
92
"
/>
<
location
filename
=
"
zpmainframe.ui
"
line
=
"
353
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
11
6
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
12
4
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
11
9
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
12
7
"
/>
<
source
>
Name
<
/source
>
<
translation
>
名称
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.ui
"
line
=
"
102
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
17
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
20
"
/>
<
source
>
Addr
<
/source
>
<
translation
>
地址
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.ui
"
line
=
"
112
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
18
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
27
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
21
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
30
"
/>
<
source
>
Port
<
/source
>
<
translation
><
/translation
>
<
/message
>
...
...
@@ -658,13 +658,13 @@
<
message
>
<
location
filename
=
"
zpmainframe.ui
"
line
=
"
342
"
/>
<
location
filename
=
"
zpmainframe.ui
"
line
=
"
905
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
28
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
31
"
/>
<
source
>
Database
<
/source
>
<
translation
>
数据库资源
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.ui
"
line
=
"
363
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
12
5
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
12
8
"
/>
<
source
>
Type
<
/source
>
<
translation
>
类型
<
/translation
>
<
/message
>
...
...
@@ -842,46 +842,46 @@
<
translation
>
重新加载配置文件并调整服务器参数
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
19
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
22
"
/>
<
source
>
SSL
<
/source
>
<
translation
>
SSL
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
12
6
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
12
9
"
/>
<
source
>
HostAddr
<
/source
>
<
translation
>
服务地址
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
29
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
32
"
/>
<
source
>
Username
<
/source
>
<
translation
>
用户名
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
13
0
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
13
3
"
/>
<
source
>
Options
<
/source
>
<
translation
>
附加选项
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
13
1
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
13
4
"
/>
<
source
>
TestSQL
<
/source
>
<
translation
>
用于测试连接的SQL
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
22
2
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
22
5
"
/>
<
source
>
Current
Listen
Threads
:
%
1
<
/source
>
<
translation
>
监听端口
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
22
4
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
22
7
"
/>
<
source
>
Listen
Threads
%
1
:
%
2
<
/source
>
<
translation
>
线程
%
1
监听
%
2
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
2
27
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
2
30
"
/>
<
source
>
Current
Trans
Threads
:
%
1
<
/source
>
<
translation
>
传输线程
:
%
1
...
...
@@ -904,176 +904,176 @@
<
translation
>
有尚未主动退出的节点套接字
,
是否继续等待
?
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
14
6
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
57
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
68
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
19
4
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
14
9
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
60
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
1
71
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
19
7
"
/>
<
source
>
,
Source
=%
1
<
/source
>
<
translation
>
,
来源
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
23
0
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
26
3
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
23
3
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
26
6
"
/>
<
source
>
%
1
:
%
2
<
/source
>
<
translation
><
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
23
6
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
23
9
"
/>
<
source
>
Current
Task
Threads
:
%
1
<
/source
>
<
translation
>
逻辑处理线程
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
2
37
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
2
40
"
/>
<
source
>
Current
Task
Payload
:
%
1
<
/source
>
<
translation
>
逻辑处理负荷
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
2
38
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
2
41
"
/>
<
source
>
Current
Task
Idle
Threads
:
%
1
<
/source
>
<
translation
>
空闲逻辑处理线程
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
24
2
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
24
5
"
/>
<
source
>
Database
Connections
:
%
1
<
/source
>
<
translation
>
数据库连接
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
24
6
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
24
9
"
/>
<
source
>
%
1
status
=
%
2
<
/source
>
<
translation
>
连接
%
1
状态
%
2
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
25
3
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
25
6
"
/>
<
source
>
Cluster
Group
Paras
:
<
/source
>
<
translation
>
集群终端参数
:
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
25
4
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
25
7
"
/>
<
source
>
Terminal
%
1
:
%
2
,
published
Address
:
%
3
:
%
4
<
/source
>
<
translation
>
终端
%
1
:
%
2
,
发布地址
:
%
3
:
%
4
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
26
0
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
26
3
"
/>
<
source
>
Trans
Threads
:
%
1
<
/source
>
<
translation
>
传输线程
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
2
68
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
2
71
"
/>
<
source
>
Shift
Threads
:
%
1
<
/source
>
<
translation
>
处理线程
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
2
69
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
2
72
"
/>
<
source
>
Shift
Payload
:
%
1
<
/source
>
<
translation
>
处理线程负荷
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
27
0
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
27
3
"
/>
<
source
>
Shift
Idle
Threads
:
%
1
<
/source
>
<
translation
>
处理线程空闲
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
27
3
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
27
6
"
/>
<
source
>
Smartlink
Function
Server
Paras
:
<
/source
>
<
translation
>
Smartlink
功能服务器专有参数
:
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
27
4
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
27
7
"
/>
<
source
>
User
Account
Database
is
:
%
1
<
/source
>
<
translation
>
用户信息数据库
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
27
5
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
27
8
"
/>
<
source
>
Event
Database
is
:
%
1
<
/source
>
<
translation
>
重要事件数据库
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
27
6
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
27
9
"
/>
<
source
>
Local
folder
for
large
file
is
:
%
1
<
/source
>
<
translation
>
磁盘仓库根路径
:
%
1
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
2
77
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
2
80
"
/>
<
source
>
Heart
beating
Threadhold
is
:
%
1
<
/source
>
<
translation
>
心跳保活门限
%
1
秒
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
65
3
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
65
8
"
/>
<
source
>
Name
Already
Used
.
<
/source
>
<
translation
>
名称已经存在
.
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
65
3
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
65
8
"
/>
<
source
>
The
listener
name
has
been
used
.
<
/source
>
<
translation
>
监听器的名称已经被使用了
。
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
6
58
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
6
63
"
/>
<
source
>
Invalid
Paraments
.
<
/source
>
<
translation
>
无效的参数
.
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
6
58
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
6
63
"
/>
<
source
>
Address
must
be
valid
,
Port
between
1024
to
32767
.
<
/source
>
<
translation
>
监听端口需要介于
1024
到
32767
之间
。
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
70
4
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
70
9
"
/>
<
source
>
Open
Conf
file
<
/source
>
<
translation
>
打开配置文件
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
7
05
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
7
10
"
/>
<
source
>
Ini
files
(
*
.
ini
)
<
/source
>
<
translation
>
Ini文件
(
*
.
ini
)
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
7
19
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
7
24
"
/>
<
source
>
Name
can
&
apos
;
t
be
empty
.
<
/source
>
<
translation
>
名称不能为空
.
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
7
19
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
7
24
"
/>
<
source
>
Database
name
can
not
be
empty
.
<
/source
>
<
translation
>
数据库资源名称不能为空
。
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
72
4
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
72
9
"
/>
<
source
>
Name
already
exist
.
<
/source
>
<
translation
>
名称已经被使用了
。
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
72
4
"
/>
<
location
filename
=
"
zpmainframe.cpp
"
line
=
"
72
9
"
/>
<
source
>
Database
name
already
exist
.
<
/source
>
<
translation
>
名称已经被使用了
。
<
/translation
>
<
/message
>
...
...
@@ -1115,7 +1115,7 @@
<
/message
>
<
/context
>
<
context
>
<
name
>
ZPNetwork
::
zp_net_
ThreadPool
<
/name
>
<
name
>
ZPNetwork
::
zp_net_
Engine
<
/name
>
<
message
>
<
location
filename
=
"
network/zp_net_threadpool.cpp
"
line
=
"
117
"
/>
<
source
>
This
ID
has
been
used
.
<
/source
>
...
...
@@ -1142,4 +1142,32 @@
<
translation
>
需要一些逻辑处理线程来处理具体的事件
。
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ZP_Cluster
::
zp_ClusterNode
<
/name
>
<
message
>
<
location
filename
=
"
cluster/zp_clusternode.cpp
"
line
=
"
160
"
/>
<
source
>
Client
Send
a
unknown
start
Header
%
1
%
2
.
Close
client
immediately
.
<
/source
>
<
translation
>
客户发出了一个未知的开始头
%
1
%
2
.
立刻关闭连接
.
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
cluster/zp_clusternode.cpp
"
line
=
"
192
"
/>
<
source
>
Info
:
New
Svr
already
regisited
.
Ignored
.
<
/source
>
<
translation
>
Info
:
这个节点已经注册过了
,
忽略请求
.
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
cluster/zp_clusternode.cpp
"
line
=
"
200
"
/>
<
source
>
Can
not
connect
to
it
-
self
,
Loopback
connections
is
forbidden
.
<
/source
>
<
translation
>
请不要连接到自己的服务器节点
.
回环连接是不被支持的
.
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
cluster/zp_clusternode.cpp
"
line
=
"
235
"
/>
<
source
>
Client
<
/source
>
<
translation
>
节点
<
/translation
>
<
/message
>
<
message
>
<
location
filename
=
"
cluster/zp_clusternode.cpp
"
line
=
"
235
"
/>
<
source
>
is
dead
,
kick
out
.
<
/source
>
<
translation
>
丢失心跳
,
终止该节点的连接
。
<
/translation
>
<
/message
>
<
/context
>
<
/TS
>
ZoomPipeline_FuncSvr/cluster/zp_clusterterm.cpp
浏览文件 @
569f27b8
...
...
@@ -14,7 +14,7 @@ namespace ZP_Cluster{
connect
(
m_pClusterNet
,
&
ZPNetwork
::
zp_net_Engine
::
evt_Data_transferred
,
this
,
&
zp_ClusterTerm
::
on_evt_Data_transferred
);
connect
(
m_pClusterNet
,
&
ZPNetwork
::
zp_net_Engine
::
evt_ClientDisconnected
,
this
,
&
zp_ClusterTerm
::
on_evt_ClientDisconnected
);
connect
(
m_pClusterNet
,
&
ZPNetwork
::
zp_net_Engine
::
evt_NewClientConnected
,
this
,
&
zp_ClusterTerm
::
on_evt_NewClientConnected
);
//connect(m_pClusterNet,&ZPNetwork::zp_net_
ThreadPool
::evt_ClientEncrypted, this,&zp_ClusterTerm::on_evt_ClientEncrypted);
//connect(m_pClusterNet,&ZPNetwork::zp_net_
Engine
::evt_ClientEncrypted, this,&zp_ClusterTerm::on_evt_ClientEncrypted);
m_nPortPublish
=
0
;
m_nHeartBeatingTime
=
20
;
...
...
ZoomPipeline_FuncSvr/network/zp_net_threadpool.cpp
浏览文件 @
569f27b8
...
...
@@ -6,7 +6,7 @@ namespace ZPNetwork{
/**
* @brief Construct a net thread pool object.
*
* @fn zp_net_
ThreadPool
* @fn zp_net_
Engine
* @param nPayLoad The data to be sent in buffer will be cutted into pieces, each pieces equals to nPayLoad bytes
* @param parent a Qt-style parent pointer. this object will be auto-deleted when parent is about to be destoryed.
*/
...
...
@@ -26,7 +26,7 @@ namespace ZPNetwork{
/**
* @brief return all of these listener names.
*
* @fn zp_net_
ThreadPool
::ListenerNames
* @fn zp_net_
Engine
::ListenerNames
* @return QStringList listener names.
*/
QStringList
zp_net_Engine
::
ListenerNames
()
...
...
@@ -37,7 +37,7 @@ namespace ZPNetwork{
/**
* @brief Return how many threads is now actived for TCP transfer.
*
* @fn zp_net_
ThreadPool
::TransThreadNum
* @fn zp_net_
Engine
::TransThreadNum
* @return int 0 means no thread is active.
*/
int
zp_net_Engine
::
TransThreadNum
()
...
...
@@ -47,7 +47,7 @@ namespace ZPNetwork{
/**
* @brief Return how many threads is now actived for SSL/Plain TCP transfer.
*
* @fn zp_net_
ThreadPool
::TransThreadNum
* @fn zp_net_
Engine
::TransThreadNum
* @param bSSL true means SSL Connection, false is Plain Connection
* @return int The transfer thread count for SSL connections.
*/
...
...
@@ -68,7 +68,7 @@ namespace ZPNetwork{
/**
* @brief This function returns how many clients managed by idxThread is now online.
*
* @fn zp_net_
ThreadPool
::totalClients
* @fn zp_net_
Engine
::totalClients
* @param idxThread The thread index between 0 and TransThreadNum()-1
* @return int Clients which are currently online
*/
...
...
@@ -84,7 +84,7 @@ namespace ZPNetwork{
/**
* @brief Begin a listening socket at special address and port. The socket will be activated as soon as possible
* The Wait-and-Accept approaches are all managed by Listening thread, instead of main-GUI thread.
* @fn zp_net_
ThreadPool
::AddListeningAddress
* @fn zp_net_
Engine
::AddListeningAddress
* @param id The name of this listening address:port. You can later using RemoveListeningAddress(id) to close it.
* @param address Listening address. IPV6 is now not tested.
* @param nPort Listening Port. in Linux, this value should larger than 1024.
...
...
@@ -120,7 +120,7 @@ namespace ZPNetwork{
/**
* @brief Remove a listening socket at special address and port.The socket will be deactivated as soon as possible
*
* @fn zp_net_
ThreadPool
::RemoveListeningAddress
* @fn zp_net_
Engine
::RemoveListeningAddress
* @param id Listening-Address name specified by AddListeningAddress()
*/
void
zp_net_Engine
::
RemoveListeningAddress
(
const
QString
&
id
)
...
...
@@ -133,7 +133,7 @@ namespace ZPNetwork{
/**
* @brief Cancel all addresses.
*
* @fn zp_net_
ThreadPool
::RemoveAllAddresses
* @fn zp_net_
Engine
::RemoveAllAddresses
*/
void
zp_net_Engine
::
RemoveAllAddresses
()
{
...
...
@@ -144,9 +144,9 @@ namespace ZPNetwork{
}
/**
* @brief This slot recieved incomming client socketDescriptor from listening threads.In this function, zp_net_
ThreadPool
* @brief This slot recieved incomming client socketDescriptor from listening threads.In this function, zp_net_
Engine
* will make a balance control, choosing a trans-thread which currently holds least clients than others.
* @fn zp_net_
ThreadPool
::on_New_Arrived_Client
* @fn zp_net_
Engine
::on_New_Arrived_Client
* @param socketDescriptor the socket descriptor for incomming client.
*/
void
zp_net_Engine
::
on_New_Arrived_Client
(
qintptr
socketDescriptor
)
...
...
@@ -195,7 +195,7 @@ namespace ZPNetwork{
/**
* @brief This is a slot function. when a listening thread is terminated,
* the thread itself will be deleted here. Some cleanning works is also needed.
* @fn zp_net_
ThreadPool
::on_ListenClosed
* @fn zp_net_
Engine
::on_ListenClosed
* @param id the terminated thread id.
*/
void
zp_net_Engine
::
on_ListenClosed
(
const
QString
&
id
)
...
...
@@ -226,7 +226,7 @@ namespace ZPNetwork{
/**
* @brief Add some threads to hold transfer between server and client.
* The send and recieve approaches are all managed by these threads, instead of main-GUI thread.
* @fn zp_net_
ThreadPool
::AddClientTransThreads
* @fn zp_net_
Engine
::AddClientTransThreads
* @param nThreads
* @param bSSL
*/
...
...
@@ -267,7 +267,7 @@ namespace ZPNetwork{
/**
* @brief This slot will be called, when an Trans-thread is about to close.
* Some cleanning works will be done ,all resources will be freeed.
* @fn zp_net_
ThreadPool
::TransThreadDel
* @fn zp_net_
Engine
::TransThreadDel
* @param pThreadObj The closing thread object.
* @return bool in normal situation, this slot is always return true.
*/
...
...
@@ -314,7 +314,7 @@ namespace ZPNetwork{
* @brief Kick all clients from server
* This Method is designed as an "Easy to compromise" method, which means this
* approach only "suggests" all these trans threads, that client should be kicked later.
* @fn zp_net_
ThreadPool
::KickAllClients
* @fn zp_net_
Engine
::KickAllClients
*/
void
zp_net_Engine
::
KickAllClients
()
{
...
...
@@ -327,7 +327,7 @@ namespace ZPNetwork{
/**
* @brief :Deactive server immediately
* This Method is designed as an "Mandatory" method, which means all clients will be sooner kicked out.
* @fn zp_net_
ThreadPool
::DeactiveImmediately
* @fn zp_net_
Engine
::DeactiveImmediately
*/
void
zp_net_Engine
::
DeactiveImmediately
()
{
...
...
@@ -341,7 +341,7 @@ namespace ZPNetwork{
/**
* @brief Remove n Trans Thread(s)
* A thread marked as "removed" will be terminated after its last client socket exited.
* @fn zp_net_
ThreadPool
::RemoveClientTransThreads
* @fn zp_net_
Engine
::RemoveClientTransThreads
* @param nThreads how many threads will be marked as "removed"
* @param bSSL true means SSL threads, false means Plain
*/
...
...
@@ -370,7 +370,7 @@ namespace ZPNetwork{
* @brief This slot send some data to a client.
* Because a client socket is actually belongs to a transfer-thread,
* this event will be re-fired as evt_SendDataToClient, transfer-threads will
* @fn zp_net_
ThreadPool
::SendDataToClient
* @fn zp_net_
Engine
::SendDataToClient
* @param objClient The destin client
* @param dtarray data to be sent
*/
...
...
@@ -381,7 +381,7 @@ namespace ZPNetwork{
/**
* @brief This slot kick client from server.
* @fn zp_net_
ThreadPool
::KickClients
* @fn zp_net_
Engine
::KickClients
* @param object Client to be kicked.
*/
void
zp_net_Engine
::
KickClients
(
QObject
*
object
)
...
...
@@ -392,7 +392,7 @@ namespace ZPNetwork{
/**
* @brief Broadcast data to every client, except for the source object
*
* @fn zp_net_
ThreadPool
::BroadcastData
* @fn zp_net_
Engine
::BroadcastData
* @param objFromClient the source object.
* @param dtarray data to be sent.
*/
...
...
@@ -405,7 +405,7 @@ namespace ZPNetwork{
/**
* @brief Test whether this threadpool can be safely closed.
* This function will return false as long as some clients is still active.
* @fn zp_net_
ThreadPool
::CanExit
* @fn zp_net_
Engine
::CanExit
* @return bool true means can close, false mean can not close.
*/
bool
zp_net_Engine
::
CanExit
()
...
...
@@ -427,7 +427,7 @@ namespace ZPNetwork{
/**
* @brief Positive connect to a server.
* In p2p connection, when the other side opens a listening address, this object can directly connect to the remote side.
* @fn zp_net_
ThreadPool
::connectTo
* @fn zp_net_
Engine
::connectTo
* @param address the address to connect to
* @param nPort port to connect to
* @param bSSLConn if true, SSL connections will be used
...
...
ZoomPipeline_FuncSvr/network/zp_net_threadpool.h
浏览文件 @
569f27b8
...
...
@@ -19,7 +19,7 @@
namespace
ZPNetwork
{
/**
* @brief zp_net_
ThreadPool
provides a multi-thread listening\transfer network
* @brief zp_net_
Engine
provides a multi-thread listening\transfer network
* framework. SSL and Plain sockets are both supported.
*/
class
zp_net_Engine
:
public
QObject
...
...
ZoomPipeline_FuncSvr/network/zp_netlistenthread.cpp
浏览文件 @
569f27b8
...
...
@@ -12,12 +12,12 @@ namespace ZPNetwork{
}
/**
* @brief The slot recieves startListen command from its parent
* zp_net_
ThreadPool
object. the Qt's signal-and-slots system
* zp_net_
Engine
object. the Qt's signal-and-slots system
* likes a broadcast system, so, a string id should be used to
* tell each listening zp_netListenThread, only this id should be
* notified.
*
* @param id the Listening ID that zp_net_
ThreadPool
really
* @param id the Listening ID that zp_net_
Engine
really
* want to operate.
*/
void
zp_netListenThread
::
startListen
(
const
QString
&
id
)
...
...
@@ -44,7 +44,7 @@ namespace ZPNetwork{
/**
* @brief this method is very similar to zp_netListenThread::startListen(const QString & id)
*
* @param id the Listening ID that zp_net_
ThreadPool
really want to operate.
* @param id the Listening ID that zp_net_
Engine
really want to operate.
*/
void
zp_netListenThread
::
stopListen
(
const
QString
&
id
)
{
...
...
ZoomPipeline_FuncSvr/network/zp_nettransthread.cpp
浏览文件 @
569f27b8
...
...
@@ -74,7 +74,7 @@ namespace ZPNetwork{
* @brief This slot dealing with multi-thread client socket accept.
* accepy works start from zp_netListenThread::m_tcpserver, end with this method.
* the socketDescriptor is delivered from zp_netListenThread(a Listening thread)
* to zp_net_
ThreadPool
(Normally in main-gui thread), and then zp_netTransThread.
* to zp_net_
Engine
(Normally in main-gui thread), and then zp_netTransThread.
*
* @param threadid if threadid is not equal to this object, this message is just omitted.
* @param socketDescriptor socketDescriptor for incomming client.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录