Skip to content

Commit b5d8671

Browse files
authored
Merge pull request #47 from libxengine/develop
V3.17 Merge
2 parents 1b3aea7 + d04cbb7 commit b5d8671

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+620
-279
lines changed

.github/workflows/Rocky_build.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
build:
1717
runs-on: ${{ matrix.runner }}
1818
container:
19-
image: rockylinux/rockylinux:9.5
19+
image: rockylinux/rockylinux:${{ matrix.version }}
2020
options: --platform ${{ matrix.platform }}
2121
strategy:
2222
matrix:
@@ -25,10 +25,22 @@ jobs:
2525
runner: ubuntu-24.04
2626
platform: linux/amd64
2727
artifact: x86-64
28+
version: 9
29+
- arch: amd64
30+
runner: ubuntu-24.04
31+
platform: linux/amd64
32+
artifact: x86-64
33+
version: 10
34+
- arch: arm64
35+
runner: ubuntu-24.04-arm
36+
platform: linux/arm64
37+
artifact: Arm64
38+
version: 9
2839
- arch: arm64
2940
runner: ubuntu-24.04-arm
3041
platform: linux/arm64
3142
artifact: Arm64
43+
version: 10
3244

3345
steps:
3446
- name: Checkout main repository code
@@ -46,7 +58,7 @@ jobs:
4658
uses: actions/checkout@v4
4759
with:
4860
repository: libxengine/XEngine_OPenSource
49-
path: XEngine_Source/XEngine_Depend
61+
path: XEngine_Source/XEngine_DependLibrary
5062

5163
- name: Set TERM variable
5264
run: echo "TERM=xterm" >> $GITHUB_ENV
@@ -59,9 +71,9 @@ jobs:
5971
- name: install xengine library
6072
run: |
6173
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
62-
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_9_${{ matrix.artifact }}.zip
63-
unzip ./XEngine_RockyLinux_9_${{ matrix.artifact }}.zip -d ./XEngine_RockyLinux_9_${{ matrix.artifact }}
64-
cd XEngine_RockyLinux_9_${{ matrix.artifact }}
74+
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}.zip
75+
unzip ./XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}.zip -d ./XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
76+
cd XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
6577
6678
chmod 777 *
6779
./XEngine_LINEnv.sh -i 3
@@ -85,6 +97,6 @@ jobs:
8597
- name: Upload folder as artifact with RockyLinux
8698
uses: actions/upload-artifact@v4
8799
with:
88-
name: XEngine_MQServiceApp-RockyLinux_9_${{ matrix.artifact }}
100+
name: XEngine_MQServiceApp-RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
89101
path: XEngine_Release/
90102
retention-days: 1

.github/workflows/debian_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: actions/checkout@v4
4141
with:
4242
repository: libxengine/XEngine_OPenSource
43-
path: XEngine_Source/XEngine_Depend
43+
path: XEngine_Source/XEngine_DependLibrary
4444

4545
- name: Set TERM variable
4646
run: echo "TERM=xterm" >> $GITHUB_ENV

.github/workflows/fedora_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
uses: actions/checkout@v4
4747
with:
4848
repository: libxengine/XEngine_OPenSource
49-
path: XEngine_Source/XEngine_Depend
49+
path: XEngine_Source/XEngine_DependLibrary
5050

5151
- name: install system package
5252
run: |

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "XEngine_Source/XEngine_Depend"]
2-
path = XEngine_Source/XEngine_Depend
2+
path = XEngine_Source/XEngine_DependLibrary
33
url = https://github.com/libxengine/XEngine_OPenSource.git

CHANGELOG

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
XEngine_MQService V3.17.0.1001
2+
3+
增加:rocky linux 10 支持
4+
增加:http basic和digest验证支持
5+
增加:电子邮件通知功能
6+
更新:依赖库
7+
更新:匹配最新xengine 版本
8+
优化:消息响应设置
9+
修改:依赖库目录名
10+
修改:启动参数不区分大小写
11+
修改:消息协议头大小
12+
修正:某些时候配置读取内存溢出
13+
修正:版本输出错误
14+
修正:未读消息协议头字段不正确
15+
删除:注册验证
16+
17+
added:ci rocky linux 10 support
18+
added:http basic and digest verification support
19+
added:email notify support
20+
update:depend library
21+
update:match xengine last version
22+
improved:reply message protocol set
23+
modify:depend library direction name
24+
modify:start parameter are not case sensitive
25+
modify:message header size
26+
fixed:sometime load configure memory leak
27+
fixed:version print failure when set -v parameter
28+
fixed:header protocol field incorrect when unread message reply
29+
delete:register authorize
30+
======================================================================================
131
XEngine_MQService V3.16.0.1001
232

333
增加:使用内存池发送数据

README.en.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ this software support following features
3535
19. message attritube
3636
20. point to point message
3737
21. Memory Database
38+
22. http verification
39+
23. email notify
40+
24. sms notify(plan)
3841

3942
## install
4043

@@ -54,7 +57,7 @@ Requires MYSQL service support, execute XEngine_SQLFile/CreateDatabase.sql to cr
5457
Execute XEngine_SQLFile/XEngine_MQData.sql and XEngine_SQLFile/XEngine_MQUser.sql to create the table
5558

5659
#### sub module
57-
Due to the dependent sub-modules, after you checkout the warehouse, execute the following command in the warehouse directory to pull the sub-modules
60+
Due to the dependent sub-modules, after you checkout the resprepository, execute the following command in the resprepository directory to pull the sub-modules
5861
git submodule init
5962
git submodule update
6063

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ c c++Message Service
3737
19. 消息属性
3838
20. 点对点消息
3939
21. 高速缓存
40+
22. http验证
41+
23. 电子邮件通知
42+
24. 短信通知(plan)
4043

4144
## 安装教程
4245

@@ -59,7 +62,7 @@ macos执行:./XEngine_LINEnv.sh -i 3
5962
由于依赖的子模块,在你checkout仓库后,在仓库目录下执行下面的命令拉取子模块
6063
git submodule init
6164
git submodule update
62-
如果github访问失败,你也可以clone该项目,在主目录下使用命令:git clone https://gitee.com/xengine/XEngine_OPenSource.git XEngine_Source/XEngine_Depend
65+
如果github访问失败,你也可以clone该项目,在主目录下使用命令:git clone https://gitee.com/xengine/XEngine_OPenSource.git XEngine_Source/XEngine_DependLibrary
6366

6467
#### Windows
6568
使用VS打开并且编译,支持WINDOWS 7SP1以上系统

XEngine_Apps/MQCore_HTTPApp/MQCore_HTTPApp.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@
7272
<PropertyGroup Label="UserMacros" />
7373
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7474
<LinkIncremental>true</LinkIncremental>
75-
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
75+
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
7676
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
7777
</PropertyGroup>
7878
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
7979
<LinkIncremental>false</LinkIncremental>
8080
</PropertyGroup>
8181
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
8282
<LinkIncremental>true</LinkIncremental>
83-
<IncludePath>$(XEngine_Include);$(IncludePath)</IncludePath>
83+
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
8484
<LibraryPath>$(XEngine_Lib64);$(LibraryPath)</LibraryPath>
8585
</PropertyGroup>
8686
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

XEngine_Apps/MQCore_HTTPApp/MQCore_HTTPApp.vcxproj.filters

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
66
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
77
</Filter>
8-
<Filter Include="头文件">
9-
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10-
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11-
</Filter>
128
<Filter Include="资源文件">
139
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
1410
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
1511
</Filter>
12+
<Filter Include="源文件\头文件">
13+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
14+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
15+
</Filter>
1616
</ItemGroup>
1717
<ItemGroup>
1818
<ClCompile Include="MQCore_HTTPApp.cpp">

XEngine_Apps/MQCore_TCPApp/MQCore_TCPApp.cpp

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using namespace std;
2525
XSOCKET m_Socket;
2626
__int64x nLastNumber = 0;
2727
LPCXSTR lpszKey = _X("XEngine_CommKey"); //主题
28-
LPCXSTR lpszUser = _X("aaadddzxc");
28+
LPCXSTR lpszUser = _X("123123aa");
2929
LPCXSTR lpszPass = _X("123123");
3030

3131
void MQ_Authorize()
@@ -247,6 +247,56 @@ void MQ_Post(LPCXSTR lpszMsgBuffer, int nType = 0, int nPubTime = -1, bool bSelf
247247
memcpy(&st_XMQProtocol, ptszMsgBuffer, sizeof(XENGINE_PROTOCOL_XMQ));
248248
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
249249
}
250+
void MQ_PostEMail(LPCXSTR lpszMsgBuffer)
251+
{
252+
int nLen = 0;
253+
XENGINE_PROTOCOLHDR st_ProtocolHdr;
254+
XENGINE_PROTOCOL_XMQ st_XMQProtocol;
255+
XCHAR tszMsgBuffer[2048];
256+
257+
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
258+
memset(&st_ProtocolHdr, '\0', sizeof(XENGINE_PROTOCOLHDR));
259+
memset(&st_XMQProtocol, '\0', sizeof(XENGINE_PROTOCOL_XMQ));
260+
261+
st_ProtocolHdr.wHeader = XENGIEN_COMMUNICATION_PACKET_PROTOCOL_HEADER;
262+
st_ProtocolHdr.unOperatorType = ENUM_XENGINE_COMMUNICATION_PROTOCOL_TYPE_XMQ;
263+
st_ProtocolHdr.unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_MQ_REQPOST;
264+
st_ProtocolHdr.byIsReply = true; //获得处理返回结果
265+
st_ProtocolHdr.byVersion = ENUM_XENGINE_PROTOCOLHDR_PAYLOAD_TYPE_STRING;
266+
st_ProtocolHdr.unPacketSize = sizeof(XENGINE_PROTOCOL_XMQ) + strlen(lpszMsgBuffer);
267+
st_ProtocolHdr.wTail = XENGIEN_COMMUNICATION_PACKET_PROTOCOL_TAIL;
268+
269+
st_XMQProtocol.nSerial = 0; //序列号,0服务会自动处理
270+
st_XMQProtocol.nKeepTime = 0;
271+
st_XMQProtocol.nPubTime = 0;
272+
strcpy(st_XMQProtocol.tszMQKey, lpszKey);
273+
strcpy(st_XMQProtocol.tszMQUsr, "[email protected]");
274+
275+
st_XMQProtocol.st_MSGAttr.byAttrEMail = 1;
276+
277+
nLen = sizeof(XENGINE_PROTOCOLHDR) + st_ProtocolHdr.unPacketSize;
278+
memcpy(tszMsgBuffer, &st_ProtocolHdr, sizeof(XENGINE_PROTOCOLHDR));
279+
memcpy(tszMsgBuffer + sizeof(XENGINE_PROTOCOLHDR), &st_XMQProtocol, sizeof(XENGINE_PROTOCOL_XMQ));
280+
memcpy(tszMsgBuffer + sizeof(XENGINE_PROTOCOLHDR) + sizeof(XENGINE_PROTOCOL_XMQ), lpszMsgBuffer, strlen(lpszMsgBuffer));
281+
282+
if (!XClient_TCPSelect_SendMsg(m_Socket, tszMsgBuffer, nLen))
283+
{
284+
_xtprintf("发送投递失败!\n");
285+
return;
286+
}
287+
nLen = 2048;
288+
XCHAR* ptszMsgBuffer;
289+
memset(&st_ProtocolHdr, '\0', sizeof(XENGINE_PROTOCOLHDR));
290+
291+
if (!XClient_TCPSelect_RecvPkt(m_Socket, &ptszMsgBuffer, &nLen, &st_ProtocolHdr))
292+
{
293+
_xtprintf("接受数据失败!\n");
294+
return;
295+
}
296+
memset(&st_XMQProtocol, '\0', sizeof(XENGINE_PROTOCOL_XMQ));
297+
memcpy(&st_XMQProtocol, ptszMsgBuffer, sizeof(XENGINE_PROTOCOL_XMQ));
298+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
299+
}
250300
void MQ_Get(int nType = 0)
251301
{
252302
int nLen = 0;
@@ -529,6 +579,7 @@ int main(int argc, char** argv)
529579
_xtprintf("连接成功!\n");
530580

531581
MQ_Authorize();
582+
//MQ_PostEMail("test for email");
532583
MQ_GetUNRead();
533584
MQ_Create();
534585
MQ_Post(NULL, ENUM_XENGINE_PROTOCOLHDR_PAYLOAD_TYPE_BIN, -1, true);

0 commit comments

Comments
 (0)