Skip to content

Commit dfc89bd

Browse files
authored
Merge pull request #40 from libxengine/develop
V3.12.0.1001 Merge
2 parents 0595f2f + 4adfa5b commit dfc89bd

File tree

31 files changed

+417
-159
lines changed

31 files changed

+417
-159
lines changed

.github/workflows/linuxbuild.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: ubuntu build workflows
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
strategy:
15+
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- os: ubuntu-22.04
20+
- os: ubuntu-24.04
21+
runs-on: ${{ matrix.os }}
22+
23+
steps:
24+
# 检出您的主仓库代码
25+
- name: Checkout main repository code
26+
uses: actions/checkout@v4
27+
with:
28+
ref: 'develop'
29+
30+
# 检出依赖的xengine仓库到指定的xengine目录
31+
- name: Checkout dependency repository (xengine)
32+
uses: actions/checkout@v4
33+
with:
34+
repository: libxengine/libxengine
35+
path: libxengine
36+
37+
- name: sub module checkout (opensource)
38+
run: |
39+
git submodule init
40+
git submodule update
41+
42+
# 设置依赖库的环境变量
43+
- name: Set up Dependency Environment Variables
44+
run: |
45+
cd libxengine
46+
chmod 777 *
47+
sudo ./XEngine_LINEnv.sh -i 3
48+
cd ..
49+
#编译
50+
- name: make
51+
run: |
52+
cd XEngine_Source
53+
make
54+
make FLAGS=InstallAll
55+
make FLAGS=CleanAll
56+
57+
make RELEASE=1
58+
make FLAGS=InstallAll
59+
make FLAGS=CleanAll
60+
cd ..
61+
- name: test
62+
run: |
63+
cd XEngine_Release
64+
./XEngine_MQServiceApp -t

.github/workflows/macbuild.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: macos build workflows
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
strategy:
15+
matrix:
16+
include:
17+
- os: macos-13
18+
runs-on: ${{ matrix.os }}
19+
20+
steps:
21+
- name: Checkout main repository code
22+
uses: actions/checkout@v4
23+
with:
24+
ref: 'develop'
25+
26+
# 检出依赖的xengine仓库到指定的xengine目录
27+
- name: Checkout dependency repository (xengine)
28+
uses: actions/checkout@v4
29+
with:
30+
repository: libxengine/libxengine
31+
path: libxengine
32+
33+
- name: sub module checkout (opensource)
34+
run: |
35+
git submodule init
36+
git submodule update
37+
38+
- name: brew install
39+
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
40+
41+
# 设置依赖库的环境变量
42+
- name: Set up Dependency Environment Variables
43+
run: |
44+
cd libxengine
45+
chmod 777 *
46+
./XEngine_LINEnv.sh -i 3
47+
cd ..
48+
#编译
49+
- name: make debug
50+
run: |
51+
cd XEngine_Source
52+
make PLATFORM=mac
53+
make PLATFORM=mac FLAGS=InstallAll
54+
make PLATFORM=mac FLAGS=CleanAll
55+
- name: make release
56+
run: |
57+
cd XEngine_Source
58+
make PLATFORM=mac RELEASE=1
59+
make PLATFORM=mac FLAGS=InstallAll
60+
make PLATFORM=mac FLAGS=CleanAll
61+
- name: test
62+
run: |
63+
cd XEngine_Release
64+
./XEngine_MQServiceApp -t

.github/workflows/msbuild.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: windows build workflows
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
strategy:
15+
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
16+
fail-fast: false
17+
matrix:
18+
configuration: [Debug ,Release]
19+
platform: [x86 ,x64]
20+
21+
runs-on: windows-latest # 最新的 Windows 环境
22+
23+
steps:
24+
# 检出您的主仓库代码
25+
- name: Checkout main repository code
26+
uses: actions/checkout@v4
27+
with:
28+
ref: 'develop'
29+
30+
# 检出依赖的xengine仓库到指定的xengine目录
31+
- name: Checkout dependency repository (xengine)
32+
uses: actions/checkout@v4
33+
with:
34+
repository: libxengine/libxengine
35+
path: xengine
36+
37+
- name: sub module checkout (opensource)
38+
run: |
39+
git submodule init
40+
git submodule update
41+
shell: pwsh
42+
43+
# 设置依赖库的环境变量
44+
- name: Set up Dependency Environment Variables
45+
run: |
46+
echo "XENGINE_INCLUDE=${{ github.workspace }}/xengine" | Out-File -FilePath $env:GITHUB_ENV -Append
47+
echo "XENGINE_LIB32=${{ github.workspace }}/xengine/XEngine_Windows/x86" | Out-File -FilePath $env:GITHUB_ENV -Append
48+
echo "XENGINE_LIB64=${{ github.workspace }}/xengine/XEngine_Windows/x64" | Out-File -FilePath $env:GITHUB_ENV -Append
49+
shell: pwsh
50+
51+
# 配置 MSBuild 的路径,准备构建 VC++ 项目
52+
- name: Setup MSBuild
53+
uses: microsoft/[email protected]
54+
#编译
55+
- name: Build Solution
56+
run: msbuild XEngine_Source/XEngine_MQServiceApp.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
57+
#测试
58+
- name: Conditional Step for x86 Release
59+
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
60+
run: |
61+
cp -r XEngine_Source/Release/*.dll XEngine_Release/
62+
cp -r XEngine_Source/Release/*.exe XEngine_Release/
63+
cp -r XEngine_Source/VSCopy-x86.bat XEngine_Release/
64+
cd XEngine_Release
65+
./VSCopy-x86.bat
66+
./XEngine_MQServiceApp.exe -t
67+
shell: pwsh
68+
- name: Conditional Step for x86 Debug
69+
if: matrix.configuration == 'Debug' && matrix.platform == 'x86'
70+
run: |
71+
cp -r XEngine_Source/Debug/*.dll XEngine_Release/
72+
cp -r XEngine_Source/Debug/*.exe XEngine_Release/
73+
cp -r XEngine_Source/VSCopy-x86.bat XEngine_Release/
74+
cd XEngine_Release
75+
./VSCopy-x86.bat
76+
./XEngine_MQServiceApp.exe -t
77+
shell: pwsh

CHANGELOG

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
XEngine_MQService V3.12.0.1001
2+
3+
增加:编译CI工作流支持
4+
增加:注册绑定公用消息
5+
增加:服务启动测试参数
6+
增加:MQTT消息发布的支持
7+
修正:MQTT没有日志输出
8+
修正:WEBSOCKET不支持关闭和PING协议的问题
9+
修正:DBModule_MQUser_KeyList用户参数为NULL的问题
10+
修正:指定用户发送数据的问题
11+
12+
added:build ci workflows supported
13+
added:register bind comm topic
14+
added:start test parameter
15+
added:mqtt message publish support
16+
fixed:log not print for mqtt
17+
fixed:close and ping protocol support for websocket protocol
18+
fixed:DBModule_MQUser_KeyList user parameter is null incorrect
19+
fixed:The problem of specifying invalid sending user
20+
======================================================================================
121
XEngine_MQService V3.11.0.1001
222

323
增加:MQTT协议服务支持

README.en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ this software support following features
3838

3939
#### XEngine Evn
4040
you must install XEngine,need V8.31 or above,install XEngine can be refer to xengine Readme docment
41-
GITEE:https://gitee.com/xyry/libxengine
42-
GITHUB:https://github.com/libxengine/xengine
41+
GITEE:https://gitee.com/libxengine/libxengine
42+
GITHUB:https://github.com/libxengine/libxengine
4343

4444
##### fast to deployment
45-
git clone https://gitee.com/xyry/libxengine.git or git clone https://github.com/libxengine/xengine.git
45+
git clone https://gitee.com/libxengine/libxengine.git or git clone https://github.com/libxengine/libxengine.git
4646
window Exection XEngine_WINEnv.bat
4747
Linux Exection:sudo ./XEngine_LINEnv.sh -i 3
4848
Macos Exection:./XEngine_LINEnv.sh -i 3

README.md

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ c c++Message Service
3737

3838
#### XEngine环境
3939
必须安装XEngine,版本需要V8.31或者以上版本,安装XEngine可以参考其Readme文档
40-
GITEE:https://gitee.com/xyry/libxengine
41-
GITHUB:https://github.com/libxengine/xengine
40+
GITEE:https://gitee.com/libxengine/libxengine
41+
GITHUB:https://github.com/libxengine/libxengine
4242

4343
##### 快速部署
44-
git clone https://gitee.com/xyry/libxengine.git 或者 git clone https://github.com/libxengine/xengine.git
44+
git clone https://gitee.com/libxengine/libxengine.git 或者 git clone https://github.com/libxengine/libxengine.git
4545
window执行XEngine_WINEnv.bat 脚本.
4646
Linux执行:sudo ./XEngine_LINEnv.sh -i 3
4747
macos执行:./XEngine_LINEnv.sh -i 3
@@ -53,7 +53,8 @@ macos执行:./XEngine_LINEnv.sh -i 3
5353
#### sub module
5454
由于依赖的子模块,在你checkout仓库后,在仓库目录下执行下面的命令拉取子模块
5555
git submodule init
56-
git submodule update
56+
git submodule update
57+
如果github访问失败,你也可以clone该项目,在主目录下使用命令:git clone https://gitee.com/xengine/XEngine_OPenSource.git XEngine_Source/XEngine_Depend
5758

5859
#### Windows
5960
使用VS打开并且编译,支持WINDOWS 7SP1以上系统
@@ -122,24 +123,6 @@ make FLAGS=CleanAll 清理编译
122123
## 关注我们
123124
如果你觉得这个软件对你有帮助,请你给我们一个START吧
124125

125-
## 开发计划
126-
扩展获取消息的内容
127-
数据库缓存功能
128-
用户消息
129-
完善消息属性生效
130-
公众号和小程序
131-
QOS(支持强回复确认)
132-
功能开关
133-
MQTT支持
134-
支持时区设置
135-
完善消息订阅(永存)
136-
完善HTTP_CALL
137-
高性能内存队列
138-
扩充HTTP管理接口
139-
消息变量,支持消息变量设置
140-
序列号重置与优化
141-
完善公用KEY的使用
142-
143126
## 提交问题
144127

145128
如果你有问题,可以在issues中提交

XEngine_Apps/MQCore_TCPApp/MQCore_TCPApp.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ using namespace std;
2424

2525
XSOCKET m_Socket;
2626
__int64x nLastNumber = 0;
27-
LPCXSTR lpszKey = _X("XEngine_NotifyKey"); //主题
27+
LPCXSTR lpszKey = _X("XEngine_CommKey"); //主题
28+
LPCXSTR lpszUser = _X("aaadddzxc");
29+
LPCXSTR lpszPass = _X("123123");
2830

2931
void MQ_Register()
3032
{
@@ -48,8 +50,8 @@ void MQ_Register()
4850
st_ProtocolInfo.nUserState = 0;
4951
st_ProtocolInfo.nPhoneNumber = 13699999999;
5052
st_ProtocolInfo.nIDNumber = 511000000000101010;
51-
strcpy(st_ProtocolInfo.tszUserName, "123123aa");
52-
strcpy(st_ProtocolInfo.tszUserPass, "123123");
53+
strcpy(st_ProtocolInfo.tszUserName, lpszUser);
54+
strcpy(st_ProtocolInfo.tszUserPass, lpszPass);
5355
strcpy(st_ProtocolInfo.tszEMailAddr, "[email protected]");
5456

5557
st_ProtocolHdr.unPacketSize = sizeof(XENGINE_PROTOCOL_USERINFO);
@@ -95,8 +97,8 @@ void MQ_Authorize()
9597
st_ProtocolHdr.byIsReply = true; //获得处理返回结果
9698
st_ProtocolHdr.wTail = XENGIEN_COMMUNICATION_PACKET_PROTOCOL_TAIL;
9799

98-
strcpy(st_ProtocolAuth.tszUserName, "123123aa");
99-
strcpy(st_ProtocolAuth.tszUserPass, "123123");
100+
strcpy(st_ProtocolAuth.tszUserName, lpszUser);
101+
strcpy(st_ProtocolAuth.tszUserPass, lpszPass);
100102

101103
st_ProtocolHdr.unPacketSize = sizeof(XENGINE_PROTOCOL_USERAUTH);
102104

@@ -199,8 +201,8 @@ void MQ_DeleteUser()
199201
st_ProtocolInfo.nUserState = 0;
200202
st_ProtocolInfo.nPhoneNumber = 13699999999;
201203
st_ProtocolInfo.nIDNumber = 511000000000101010;
202-
strcpy(st_ProtocolInfo.tszUserName, "123123aa");
203-
strcpy(st_ProtocolInfo.tszUserPass, "123123");
204+
strcpy(st_ProtocolInfo.tszUserName, lpszUser);
205+
strcpy(st_ProtocolInfo.tszUserPass, lpszPass);
204206
strcpy(st_ProtocolInfo.tszEMailAddr, "[email protected]");
205207

206208
nLen = sizeof(XENGINE_PROTOCOLHDR) + st_ProtocolHdr.unPacketSize;

XEngine_Docment/Docment_en.docx

8.12 KB
Binary file not shown.

XEngine_Docment/Docment_zh.docx

7.51 KB
Binary file not shown.
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
2-
"MQUser":{
3-
"UserTime":{
4-
"bPubClear":false
2+
"MQUser": {
3+
"UserTime": {
4+
"bPubClear": false
55
}
66
},
7-
"MQData":{
8-
"nDBMonth":3
7+
"MQData": {
8+
"bCommSub": true,
9+
"nDBMonth": 3
910
}
1011
}

0 commit comments

Comments
 (0)