Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
colorEagleStdio
zoompipeline
提交
a6724a22
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 搜索 >>
提交
a6724a22
编写于
5月 11, 2014
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
uing qt int defs instead of platform specified int macros.
上级
bc1f3eb5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
184 deletion
+41
-184
ZoomPipeline_FuncSvr/cluster/cross_svr_messages.h
ZoomPipeline_FuncSvr/cluster/cross_svr_messages.h
+16
-54
ZoomPipeline_FuncSvr/smartlink/st_message.h
ZoomPipeline_FuncSvr/smartlink/st_message.h
+9
-34
ZoomPipeline_FuncSvr/smartlink/st_msg_applayer.h
ZoomPipeline_FuncSvr/smartlink/st_msg_applayer.h
+16
-96
未找到文件。
ZoomPipeline_FuncSvr/cluster/cross_svr_messages.h
浏览文件 @
a6724a22
#ifndef CROSS_SVR_MESSAGES_H
#define CROSS_SVR_MESSAGES_H
#include <qglobal.h>
namespace
ZP_Cluster
{
#pragma pack (push,1)
#if defined(__GNUC__)
#include <stdint.h>
typedef
struct
tag_cross_svr_message
{
struct
tag_header
{
__UINT16_TYPE__
Mark
;
//Always be "0x1234"
__UINT8_TYPE__
messagetype
;
__INT32_TYPE__
data_length
;
}
hearder
;
union
uni_payload
{
__UINT8_TYPE__
data
[
1
];
struct
tag_CSM_heartBeating
{
__UINT32_TYPE__
nClients
;
}
heartBeating
;
struct
tag_CSM_BasicInfo
{
__UINT8_TYPE__
name
[
64
];
__UINT8_TYPE__
Address_LAN
[
64
];
__UINT16_TYPE__
port_LAN
;
__UINT8_TYPE__
Address_Pub
[
64
];
__UINT16_TYPE__
port_Pub
;
}
basicInfo
;
//msgType 0x01
struct
tag_CSM_Broadcast
{
__UINT8_TYPE__
name
[
64
];
__UINT8_TYPE__
Address_LAN
[
64
];
__UINT16_TYPE__
port_LAN
;
__UINT8_TYPE__
Address_Pub
[
64
];
__UINT16_TYPE__
port_Pub
;
}
broadcastMsg
[
1
];
//msgType 0x02
}
payload
;
}
CROSS_SVR_MSG
;
#endif
#if defined(_MSC_VER)
typedef
struct
tag_cross_svr_message
{
struct
tag_header
{
unsigned
__
int16
Mark
;
//Always be 0x1234
unsigned
__
int8
messagetype
;
__
int32
data_length
;
qu
int16
Mark
;
//Always be 0x1234
qu
int8
messagetype
;
qu
int32
data_length
;
}
hearder
;
union
uni_payload
{
unsigned
__
int8
data
[
1
];
qu
int8
data
[
1
];
struct
tag_CSM_heartBeating
{
unsigned
__
int32
nClients
;
qu
int32
nClients
;
}
heartBeating
;
struct
tag_CSM_BasicInfo
{
unsigned
__
int8
name
[
64
];
unsigned
__
int8
Address_LAN
[
64
];
unsigned
__
int16
port_LAN
;
unsigned
__
int8
Address_Pub
[
64
];
unsigned
__
int16
port_Pub
;
qu
int8
name
[
64
];
qu
int8
Address_LAN
[
64
];
qu
int16
port_LAN
;
qu
int8
Address_Pub
[
64
];
qu
int16
port_Pub
;
}
basicInfo
;
struct
tag_CSM_Broadcast
{
unsigned
__
int8
name
[
64
];
unsigned
__
int8
Address_LAN
[
64
];
unsigned
__
int16
port_LAN
;
unsigned
__
int8
Address_Pub
[
64
];
unsigned
__
int16
port_Pub
;
qu
int8
name
[
64
];
qu
int8
Address_LAN
[
64
];
qu
int16
port_LAN
;
qu
int8
Address_Pub
[
64
];
qu
int16
port_Pub
;
}
broadcastMsg
[
1
];
}
payload
;
}
CROSS_SVR_MSG
;
#endif
#pragma pack(pop)
}
...
...
ZoomPipeline_FuncSvr/smartlink/st_message.h
浏览文件 @
a6724a22
#ifndef ST_MESSAGE_H
#define ST_MESSAGE_H
#include <qglobal.h>
namespace
ExampleServer
{
#pragma pack (push,1)
#if defined(__GNUC__)
#include <stdint.h>
/**
* @brief this structure provides a basic trans blocks.
*
*/
typedef
struct
tag_example_message
{
__UINT16_TYPE__
Mark
;
//Always be "0xAA55"
__UINT32_TYPE__
source_id
;
//0xffffffff means from server
__UINT32_TYPE__
destin_id
;
//0xffffffff means to server
__UINT16_TYPE__
data_length
;
//Data at least have 2 byte, for heart-beating counter.
__UINT8_TYPE__
data
[
1
];
quint16
Mark
;
//Always be 0xAA55
quint32
source_id
;
//0xffffffff means from server
quint32
destin_id
;
//0xffffffff means to server
quint16
data_length
;
//Data at least have 2 byte, for heart-beating counter.
quint8
data
[
1
];
}
EXAMPLE_TRANS_MSG
;
typedef
struct
tag_example_heartBeating
{
__UINT16_TYPE__
Mark
;
//Always be 0xBeBe
__UINT32_TYPE__
source_id
;
//0xffffffff means from server
__UINT16_TYPE__
tmStamp
;
quint16
Mark
;
//Always be 0xBeBe
quint32
source_id
;
//0xffffffff means from server
quint16
tmStamp
;
}
EXAMPLE_HEARTBEATING
;
#endif
#if defined(_MSC_VER)
typedef
struct
tag_example_message
{
unsigned
__int16
Mark
;
//Always be 0xAA55
unsigned
__int32
source_id
;
//0xffffffff means from server
unsigned
__int32
destin_id
;
//0xffffffff means to server
unsigned
__int16
data_length
;
//Data at least have 2 byte, for heart-beating counter.
unsigned
__int8
data
[
1
];
}
EXAMPLE_TRANS_MSG
;
typedef
struct
tag_example_heartBeating
{
unsigned
__int16
Mark
;
//Always be 0xBeBe
unsigned
__int32
source_id
;
//0xffffffff means from server
unsigned
__int16
tmStamp
;
}
EXAMPLE_HEARTBEATING
;
#endif
#pragma pack(pop)
}
...
...
ZoomPipeline_FuncSvr/smartlink/st_msg_applayer.h
浏览文件 @
a6724a22
#ifndef ST_MSG_APPLAYER_H
#define ST_MSG_APPLAYER_H
#include <qglobal.h>
namespace
ExampleServer
{
#pragma pack (push,1)
#if defined(__GNUC__)
#include <stdint.h>
//User Login request
//SMARTLINK_MSG_APP::MsgType = 0x0001
typedef
struct
tag_stMsg_ClientLoginReq
{
__UINT32_TYPE__
user_id
;
quint32
user_id
;
char
Passwd
[
1
];
}
stMsg_ClientLoginReq
;
//User Log response
//SMARTLINK_MSG_APP::MsgType = 0x7FFE
typedef
struct
tag_stMsg_ClientLoginRsp
{
__UINT8_TYPE__
DoneCode
;
__UINT32_TYPE__
UserID
;
__UINT8_TYPE__
Address_Redirect
[
64
];
// for server-cluster balance, may be this login should be re-direct to another address
__UINT16_TYPE__
port_Redirect
;
// and a port num.
quint8
DoneCode
;
//0- successful, 1-redirect, 3-failed.
quint32
UserID
;
quint8
Address_Redirect
[
64
];
// for server-cluster balance, may be this login should be re-direct to another address
quint16
port_Redirect
;
// and a port num.
}
stMsg_ClientLoginRsp
;
//0x1002
...
...
@@ -31,94 +28,19 @@ namespace ExampleServer{
//0x7FFD
typedef
struct
tag_stMsg_ClientLogoutRsp
{
__UINT8_TYPE__
DoneCode
;
quint8
DoneCode
;
}
stMsg_ClientLogoutRsp
;
//UploadUserListReq,0x1003
typedef
struct
tag_stMsg_UploadUserListReq
{
__UINT16_TYPE__
UserNum
;
__UINT32_TYPE__
pUserIDList
[
1
];
quint16
UserNum
;
quint32
pUserIDList
[
1
];
}
stMsg_UploadUserListReq
;
//User Log response
//SMARTLINK_MSG_APP::MsgType = 0x7FFC
typedef
struct
tag_stMsg_UploadUserListRsp
{
__UINT8_TYPE__
DoneCode
;
}
stMsg_UploadUserListRsp
;
//SMARTLINK_MSG_APP::MsgType = 0x1004
typedef
struct
tag_stMsg_DownloadUserListReq
{
}
stMsg_DownloadUserListReq
;
//SMARTLINK_MSG_APP::MsgType = 0x7FFB
typedef
struct
tag_stMsg_DownloadUserListRsp
{
__UINT8_TYPE__
DoneCode
;
__UINT16_TYPE__
UserNum
;
__UINT32_TYPE__
pUserIDList
[
1
];
}
stMsg_DownloadUserListRsp
;
typedef
struct
tag_example_app_layer
{
struct
tag_app_layer_header
{
__UINT16_TYPE__
MsgType
;
}
header
;
union
union_MsgUnion
{
stMsg_ClientLoginReq
msg_ClientLoginReq
;
stMsg_ClientLoginRsp
msg_ClientLoginRsp
;
stMsg_UploadUserListReq
msg_UploadUserListReq
;
stMsg_UploadUserListRsp
msg_UploadUserListRsp
;
stMsg_DownloadUserListReq
msg_DownloadUserListReq
;
stMsg_DownloadUserListRsp
msg_DownloadUserListRsp
;
stMsg_ClientLogoutReq
msg_ClientLogoutReq
;
stMsg_ClientLogoutRsp
msg_ClientLogoutRsp
;
}
MsgUnion
;
}
EXAMPLE_MSG_APP
;
#endif
#if defined(_MSC_VER)
//User Login request
//SMARTLINK_MSG_APP::MsgType = 0x0001
typedef
struct
tag_stMsg_ClientLoginReq
{
unsigned
__int32
user_id
;
char
Passwd
[
1
];
}
stMsg_ClientLoginReq
;
//User Log response
//SMARTLINK_MSG_APP::MsgType = 0x7FFE
typedef
struct
tag_stMsg_ClientLoginRsp
{
unsigned
__int8
DoneCode
;
//0- successful, 1-redirect, 3-failed.
unsigned
__int32
UserID
;
unsigned
__int8
Address_Redirect
[
64
];
// for server-cluster balance, may be this login should be re-direct to another address
unsigned
__int16
port_Redirect
;
// and a port num.
}
stMsg_ClientLoginRsp
;
//0x1002
typedef
struct
tag_stMsg_ClientLogoutReq
{
char
UserName
[
1
];
//max 32
}
stMsg_ClientLogoutReq
;
//0x7FFD
typedef
struct
tag_stMsg_ClientLogoutRsp
{
unsigned
__int8
DoneCode
;
}
stMsg_ClientLogoutRsp
;
//UploadUserListReq,0x1003
typedef
struct
tag_stMsg_UploadUserListReq
{
unsigned
__int16
UserNum
;
unsigned
__int32
pUserIDList
[
1
];
}
stMsg_UploadUserListReq
;
//User Log response
//SMARTLINK_MSG_APP::MsgType = 0x7FFC
typedef
struct
tag_stMsg_UploadUserListRsp
{
unsigned
__int8
DoneCode
;
quint8
DoneCode
;
//char TextInfo[64];
}
stMsg_UploadUserListRsp
;
...
...
@@ -130,18 +52,18 @@ namespace ExampleServer{
//SMARTLINK_MSG_APP::MsgType = 0x7FFB
typedef
struct
tag_stMsg_DownloadUserListRsp
{
unsigned
__
int8
DoneCode
;
unsigned
__
int16
UserNum
;
unsigned
__
int32
pUserIDList
[
1
];
qu
int8
DoneCode
;
qu
int16
UserNum
;
qu
int32
pUserIDList
[
1
];
}
stMsg_DownloadUserListRsp
;
typedef
struct
tag_example_app_layer
{
struct
tag_app_layer_header
{
unsigned
__
int16
MsgFmtVersion
;
unsigned
__
int8
AskID
;
unsigned
__
int16
MsgType
;
qu
int16
MsgFmtVersion
;
qu
int8
AskID
;
qu
int16
MsgType
;
}
header
;
union
union_MsgUnion
{
...
...
@@ -158,8 +80,6 @@ namespace ExampleServer{
}
EXAMPLE_MSG_APP
;
#endif
#pragma pack(pop)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录