Skip to content

Commit 5d0d75d

Browse files
authored
Merge pull request #9 from libxengine/develop
V3.2.0.1001 Merge
2 parents 42f41cd + f492afe commit 5d0d75d

File tree

29 files changed

+285
-251
lines changed

29 files changed

+285
-251
lines changed

CHANGELOG

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
XEngine_MQService V3.2.0.1001
2+
3+
添加:为会话模块添加心跳
4+
添加:打印XEngine版本功能
5+
修改:http现在也支持心跳协议了
6+
修改:移动会话超时函数到网络文件下
7+
修改:现在回调函数拥有更多参数
8+
修改:现在支持MACOS系统了
9+
更新:匹配XEngine V7.38版本
10+
删除:套接字超时功能
11+
删除:会话模块重复的函数
12+
13+
added:heart active for session module
14+
added:xengine version printf
15+
modify:support heartbeat for Http
16+
modify:move session timeout to net.cpp
17+
modify:support macos now
18+
update:match xengine version 7.38
19+
delete:socket timeout
20+
delete:repeated function for session module
21+
modify:callback function has more parament
22+
======================================================================================
123
XEngine_MQService V3.1.0.1001
224

325
添加:为HTTP会话ID支持

README.en.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[中文](README.md) || [English](README.en.md)
22
# XEngine_MQService
33
This repository has a development and master branch. If you want to use it, please use the master branch
4+
As long as the repository is not in suspended state, we will maintain and develop it all the time, please use it with confidence
45

56
#### Description
67
c c++消息服务 消息中间件
@@ -32,32 +33,34 @@ this software support following features
3233

3334
## install
3435

35-
#### Requirements
36-
support system above windows 7sp1 and linux(ubuntu20.04,centos8)
37-
XEngine need V7.23 or above
36+
#### XEngine Evn
37+
you must install XEngine,need V7.38 or above,install XEngine can be refer to xengine Readme docment
38+
GITEE:https://gitee.com/xyry/libxengine
39+
GITHUB:https://github.com/libxengine/xengine
40+
41+
##### fast to deployment
42+
git clone https://gitee.com/xyry/libxengine.git or git clone https://github.com/libxengine/xengine.git
43+
window Exection XEngine_WINEnv.bat
44+
Linux Exection:sudo ./XEngine_LINEnv.sh -i 3
45+
Macos Exection:./XEngine_LINEnv.sh -i 3
3846

3947
#### Windows
40-
use vs open and complie
41-
You need to configure the environment in the following way, otherwise you may need to set the library directory in the project yourself
48+
use vs open and complie,support windows 7sp1 and above
49+
Just Run it.
4250

4351
#### Linux
4452
Linux use Makefile to complie
45-
supproted ubuntu x64 or centos x64
53+
supproted ubuntu x64 or centos x64
54+
55+
#### MacOS
56+
Linux use Makefile to complie,terminal exection,Requires mac 12 and above
4657

47-
##### XEngine Install
48-
you can install xengine env to your system by shell
49-
like this:sudo XEngine_RunEnv.sh -i 3
5058
##### complie
5159
execute command in XEngine_Source path
5260
make complie
5361
make FLAGS=InstallAll install
5462
make FLAGS=CleanAll clear
5563

56-
#### XEngine Env
57-
install XEngine can be refer to xengine Readme docment
58-
GITEE:https://gitee.com/xyry/libxengine
59-
GITHUB:https://github.com/libxengine/xengine
60-
6164
#### use
6265

6366
1. Switch to the MASTER branch

README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[中文](README.md) || [English](README.en.md)
22
# XEngine_MQService
33
本仓库有开发和主分支,如果要使用,请使用master分支下的代码
4+
只要仓库不是在暂停状态,那么就会有人一直维护和开发,请放心使用
45

56
## 介绍
67
c c++消息服务 消息中间件
@@ -31,29 +32,36 @@ c c++Message Service
3132

3233
## 安装教程
3334

34-
#### 版本需求
35-
支持WINDOWS 7SP1和LINUX(UBUNT20.04,CENTOS8)以上系统
36-
XEngine版本需要V7.30或者以上版本
35+
#### XEngine环境
36+
必须安装XEngine,版本需要V7.38或者以上版本,安装XEngine可以参考其Readme文档
37+
GITEE:https://gitee.com/xyry/libxengine
38+
GITHUB:https://github.com/libxengine/xengine
39+
40+
##### 快速部署
41+
git clone https://gitee.com/xyry/libxengine.git 或者 git clone https://github.com/libxengine/xengine.git
42+
window执行XEngine_WINEnv.bat 脚本.
43+
Linux执行:sudo ./XEngine_LINEnv.sh -i 3
44+
macos执行:./XEngine_LINEnv.sh -i 3
3745

3846
#### Windows
39-
使用VS打开并且编译
40-
你需要按照下面的方式配置环境,不然你可能需要自己在项目中设置库目录
47+
使用VS打开并且编译,支持WINDOWS 7SP1以上系统
48+
直接运行即可
4149

4250
#### Linux
4351
Linux使用Makefile编译
4452
UBUNTU20.04 x64或者CENTOS8 x64均可
53+
在控制台运行
54+
55+
#### MacOS
56+
使用makefile编译,控制台运行,需要mac 12以及以上版本
57+
在控制台运行
4558

4659
##### 编译命令
47-
在XEngine_Source目录下执行命令
60+
在XEngine_Source目录下执行命令
4861
make 编译
4962
make FLAGS=InstallAll 安装库程序
5063
make FLAGS=CleanAll 清理编译
5164

52-
#### XEngine环境
53-
安装XEngine可以参考其Readme文档
54-
GITEE:https://gitee.com/xyry/libxengine
55-
GITHUB:https://github.com/libxengine/xengine
56-
5765
#### 使用说明
5866

5967
1. 切换到MASTER分支
@@ -87,11 +95,10 @@ GITHUB:https://github.com/libxengine/xengine
8795
如果你觉得这个软件对你有帮助,请你给我们一个START吧
8896

8997
## 开发计划
90-
自动移除超时客户端
98+
DDS消息订阅与发布
9199
扩展获取消息的内容
92100
消息属性生效
93101
删除包协议
94-
Session支持
95102

96103
## 提交问题
97104

XEngine_Docment/Docment_en.docx

391 Bytes
Binary file not shown.

XEngine_Docment/Docment_zh.docx

927 Bytes
Binary file not shown.

XEngine_Release/XEngine_Config/XEngine_Config.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@
1717
"nWSThread":2
1818
},
1919
"XTime":{
20-
"bHBTime":0,
2120
"nDBMonth":3,
22-
"nTimeCheck":3,
23-
"nTCPTimeOut":5,
24-
"nHttpTimeOut":5,
25-
"nWSTimeOut":5,
2621
"nSessionTime":60
2722
},
2823
"XLog":{
@@ -37,6 +32,7 @@
3732
"SQLPass":"123123Ruiyue"
3833
},
3934
"XVer":[
35+
"3.2.0.1001 Build20220715",
4036
"3.1.0.1001 Build20220408",
4137
"3.0.0.1001 Build20220318",
4238
"2.1.0.1001 Build20211119",

XEngine_Source/MQCore_ConfigModule/Config_Define.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ typedef struct tag_XEngine_ServerConfig
3434
}st_XMax;
3535
struct
3636
{
37-
BOOL bHBTime;
3837
int nDBMonth;
39-
int nTimeCheck;
40-
int nTCPTimeOut;
41-
int nHttpTimeOut;
42-
int nWSTimeOut;
4338
int nSessionTime;
4439
}st_XTime;
4540
struct

XEngine_Source/MQCore_ConfigModule/Config_Json/Config_Json.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,14 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
8686
pSt_ServerConfig->st_XMax.nHttpThread = st_JsonXMax["nHttpThread"].asInt();
8787
pSt_ServerConfig->st_XMax.nWSThread = st_JsonXMax["nWSThread"].asInt();
8888

89-
if (st_JsonRoot["XTime"].empty() || (7 != st_JsonRoot["XTime"].size()))
89+
if (st_JsonRoot["XTime"].empty() || (2 != st_JsonRoot["XTime"].size()))
9090
{
9191
Config_IsErrorOccur = TRUE;
9292
Config_dwErrorCode = ERROR_MQ_MODULE_CONFIG_JSON_XTIME;
9393
return FALSE;
9494
}
9595
Json::Value st_JsonXTime = st_JsonRoot["XTime"];
96-
pSt_ServerConfig->st_XTime.bHBTime = st_JsonXTime["bHBTime"].asInt();
9796
pSt_ServerConfig->st_XTime.nDBMonth = st_JsonXTime["nDBMonth"].asInt();
98-
pSt_ServerConfig->st_XTime.nTimeCheck = st_JsonXTime["nTimeCheck"].asInt();
99-
pSt_ServerConfig->st_XTime.nTCPTimeOut = st_JsonXTime["nTCPTimeOut"].asInt();
100-
pSt_ServerConfig->st_XTime.nHttpTimeOut = st_JsonXTime["nHttpTimeOut"].asInt();
101-
pSt_ServerConfig->st_XTime.nWSTimeOut = st_JsonXTime["nWSTimeOut"].asInt();
10297
pSt_ServerConfig->st_XTime.nSessionTime = st_JsonXTime["nSessionTime"].asInt();
10398

10499
if (st_JsonRoot["XLog"].empty() || (3 != st_JsonRoot["XLog"].size()))
Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
CC = g++ -Wall -std=c++17 -fPIC
2+
SHAREFLAG = -shared
3+
SHAREDLL = so
24
RELEASE = 0
35
UNICODE = 0
46
INCLUDE = -I ./ -I ../XEngine_ThirdPart/jsoncpp
57
LOADBIN = -L ../XEngine_ThirdPart/jsoncpp
68
LIB = -ljsoncpp
7-
LIBEX = -static-libgcc -lrt -ldl -lpthread
9+
LIBEX = -ldl -lpthread
810
LOADSO = -Wl,-rpath=./,--disable-new-dtags
911
LIBINCLUDE = Config_Json.o pch.o
1012

13+
ifeq ($(shell uname),Darwin)
14+
SHAREDLL = dylib
15+
SHAREFLAG = -dynamiclib
16+
LOADSO =
17+
else
18+
SHAREDLL = so
19+
SHAREFLAG = -shared
20+
endif
21+
1122
ifeq ($(RELEASE),1)
1223
FLAGS = -c -O2
1324
DEBUG =
1425
else
15-
FLAGS = -c -lc_p
16-
DEBUG = -g -pg
26+
FLAGS = -c
27+
DEBUG = -g
1728
endif
1829

1930
ifeq ($(UNICODE),1)
@@ -24,7 +35,7 @@ endif
2435

2536

2637
all:$(LIBINCLUDE)
27-
$(CC) $(DEBUG) $(LIBINCLUDE) -o libMQCore_ConfigModule.so -shared -fPIC $(LOADBIN) $(LIB) $(LIBEX) $(LOADSO)
38+
$(CC) $(DEBUG) $(LIBINCLUDE) -o libMQCore_ConfigModule.$(SHAREDLL) $(SHAREFLAG) -fPIC $(LOADBIN) $(LIB) $(LIBEX) $(LOADSO)
2839

2940
Config_Json.o:./Config_Json/Config_Json.cpp
3041
$(CC) $(DEBUG) $(FLAGS) $(UNICODE) $(INCLUDE) ./Config_Json/Config_Json.cpp
@@ -34,12 +45,12 @@ pch.o:./pch.cpp
3445

3546

3647
InstallAll:InstallSo
37-
InstallSo:./libMQCore_ConfigModule.so
38-
cp ./libMQCore_ConfigModule.so ../../XEngine_Release/libMQCore_ConfigModule.so
48+
InstallSo:./libMQCore_ConfigModule.$(SHAREDLL)
49+
cp ./libMQCore_ConfigModule.so ../../XEngine_Release/libMQCore_ConfigModule.$(SHAREDLL)
3950

4051

4152
CleanAll:CleanObj CleanMk
4253
CleanObj:
4354
rm *.o
4455
CleanMk:
45-
rm *.so
56+
rm *.$(SHAREDLL)
Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
CC = g++ -Wall -std=c++17 -fPIC
2+
SHAREFLAG = -shared
3+
SHAREDLL = so
24
RELEASE = 0
35
UNICODE = 0
46
INCLUDE = -I ./
57
LOADBIN = -L /usr/local/lib/XEngine_Release/XEngine_HelpComponents
68
LIB = -lHelpComponents_DataBase
7-
LIBEX = -static-libgcc -lrt -ldl -lpthread
9+
LIBEX = -ldl -lpthread
810
LOADSO = -Wl,-rpath=./,--disable-new-dtags
911
LIBINCLUDE = DBModule_MQData.o DBModule_MQUser.o pch.o
1012

13+
ifeq ($(shell uname),Darwin)
14+
SHAREDLL = dylib
15+
SHAREFLAG = -dynamiclib
16+
LOADSO =
17+
else
18+
SHAREDLL = so
19+
SHAREFLAG = -shared
20+
endif
21+
1122
ifeq ($(RELEASE),1)
1223
FLAGS = -c -O2
1324
DEBUG =
1425
else
15-
FLAGS = -c -lc_p
16-
DEBUG = -g -pg
26+
FLAGS = -c
27+
DEBUG = -g
1728
endif
1829

1930
ifeq ($(UNICODE),1)
@@ -24,7 +35,7 @@ endif
2435

2536

2637
all:$(LIBINCLUDE)
27-
$(CC) $(DEBUG) $(LIBINCLUDE) -o libMQCore_DBModule.so -shared -fPIC $(LOADBIN) $(LIB) $(LIBEX) $(LOADSO)
38+
$(CC) $(DEBUG) $(LIBINCLUDE) -o libMQCore_DBModule.$(SHAREDLL) $(SHAREFLAG) -fPIC $(LOADBIN) $(LIB) $(LIBEX) $(LOADSO)
2839

2940
DBModule_MQData.o:./DBModule_MQData/DBModule_MQData.cpp
3041
$(CC) $(DEBUG) $(FLAGS) $(UNICODE) $(INCLUDE) ./DBModule_MQData/DBModule_MQData.cpp
@@ -36,12 +47,12 @@ pch.o:./pch.cpp
3647

3748

3849
InstallAll:InstallSo
39-
InstallSo:./libMQCore_DBModule.so
40-
cp ./libMQCore_DBModule.so ../../XEngine_Release/libMQCore_DBModule.so
50+
InstallSo:./libMQCore_DBModule.$(SHAREDLL)
51+
cp ./libMQCore_DBModule.so ../../XEngine_Release/libMQCore_DBModule.$(SHAREDLL)
4152

4253

4354
CleanAll:CleanObj CleanMk
4455
CleanObj:
4556
rm *.o
4657
CleanMk:
47-
rm *.so
58+
rm *.$(SHAREDLL)

0 commit comments

Comments
 (0)