Skip to content

Commit 25733e3

Browse files
authored
Merge pull request #13 from libxengine/develop
V2.5 Release Merge
2 parents 8f9d6c0 + d7ff8cc commit 25733e3

33 files changed

+550
-1281
lines changed
Lines changed: 61 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,61 @@
1-
{
2-
"CodeMessage":[
3-
{
4-
"100":"HTTP/1.1 100 Continue",
5-
"101":"HTTP/1.1 101 Switching Protocols",
6-
"102":"HTTP/1.1 102 Processing"
7-
}
8-
],
9-
"CodeSuccess":[
10-
{
11-
"200":"HTTP/1.1 200 OK",
12-
"201":"HTTP/1.1 201 Created",
13-
"202":"HTTP/1.1 202 Accepted",
14-
"203":"HTTP/1.1 203 Non-Authoritative Information",
15-
"204":"HTTP/1.1 204 No Content",
16-
"205":"HTTP/1.1 205 Reset Content",
17-
"206":"HTTP/1.1 206 Partial Content"
18-
}
19-
],
20-
"CodeRedirect":[
21-
{
22-
"300":"HTTP/1.1 300 Multiple Choices",
23-
"301":"HTTP/1.1 301 Moved Permanently",
24-
"302":"HTTP/1.1 302 Move temporarily",
25-
"303":"HTTP/1.1 303 See Other",
26-
"304":"HTTP/1.1 304 Not Modified",
27-
"305":"HTTP/1.1 305 Use Proxy",
28-
"306":"HTTP/1.1 306 Switch Proxy"
29-
}
30-
],
31-
"CodeRequestFail":[
32-
{
33-
"400":"HTTP/1.1 400 Bad Request",
34-
"401":"HTTP/1.1 401 Payment Required",
35-
"402":"HTTP/1.1 402 Unauthorized",
36-
"403":"HTTP/1.1 403 Forbidden",
37-
"404":"HTTP/1.1 404 Not Found",
38-
"405":"HTTP/1.1 405 Method Not Allowed",
39-
"406":"HTTP/1.1 406 Not Acceptable",
40-
"407":"HTTP/1.1 407 Proxy Authentication Required",
41-
"408":"HTTP/1.1 408 Request Timeout",
42-
"409":"HTTP/1.1 409 Conflict",
43-
"410":"HTTP/1.1 410 Gone",
44-
"411":"HTTP/1.1 411 Length Required",
45-
"412":"HTTP/1.1 412 Precondition Failed",
46-
"413":"HTTP/1.1 413 Request Entity Too Large",
47-
"414":"HTTP/1.1 414 Request-URI Too Long",
48-
"415":"HTTP/1.1 415 Unsupported Media Type",
49-
"416":"HTTP/1.1 416 Requested Range Not Satisfiable",
50-
"417":"HTTP/1.1 417 Expectation Failed",
51-
"421":"HTTP/1.1 421 too many connections",
52-
"422":"HTTP/1.1 422 Unprocessable Entity",
53-
"423":"HTTP/1.1 423 Locked",
54-
"424":"HTTP/1.1 424 Failed Dependency",
55-
"425":"HTTP/1.1 425 Unordered Collection",
56-
"426":"HTTP/1.1 426 Upgrade Required",
57-
"449":"HTTP/1.1 449 Retry With",
58-
"451":"HTTP/1.1 451 Unavailable For Legal Reasons"
59-
}
60-
],
61-
"CodeServerFail":[
62-
{
63-
"500":"HTTP/1.1 500 Internal Server Error",
64-
"501":"HTTP/1.1 501 Not Implemented",
65-
"502":"HTTP/1.1 502 Bad Gateway",
66-
"503":"HTTP/1.1 503 Service Unavailable",
67-
"504":"HTTP/1.1 504 Gateway Timeout",
68-
"505":"HTTP/1.1 505 HTTP Version Not Supported",
69-
"506":"HTTP/1.1 506 Variant Also Negotiates",
70-
"507":"HTTP/1.1 507 Insufficient Storage",
71-
"508":"HTTP/1.1 509 Bandwidth Limit Exceeded",
72-
"600":"HTTP/1.1 600 Unparseable Response Headers"
73-
}
74-
],
75-
"CodeUser":[
76-
{
77-
"1001":"HTTP/1.1 1001 XyRy Auth Ok",
78-
"1002":"HTTP/1.1 1002 XyRy Auth Failed"
79-
}
80-
]
81-
}
1+
//CodeMessage
2+
100:HTTP/1.1 100 Continue
3+
101:HTTP/1.1 101 Switching Protocols
4+
102:HTTP/1.1 102 Processing
5+
//CodeSuccess
6+
200:HTTP/1.1 200 OK
7+
201:HTTP/1.1 201 Created
8+
202:HTTP/1.1 202 Accepted
9+
203:HTTP/1.1 203 Non-Authoritative Information
10+
204:HTTP/1.1 204 No Content
11+
205:HTTP/1.1 205 Reset Content
12+
206:HTTP/1.1 206 Partial Content
13+
//CodeRedirect
14+
300:HTTP/1.1 300 Multiple Choices
15+
301:HTTP/1.1 301 Moved Permanently
16+
302:HTTP/1.1 302 Move temporarily
17+
303:HTTP/1.1 303 See Other
18+
304:HTTP/1.1 304 Not Modified
19+
305:HTTP/1.1 305 Use Proxy
20+
306:HTTP/1.1 306 Switch Proxy
21+
//CodeRequestFail
22+
400:HTTP/1.1 400 Bad Request
23+
401:HTTP/1.1 401 Payment Required
24+
402:HTTP/1.1 402 Unauthorized
25+
403:HTTP/1.1 403 Forbidden
26+
404:HTTP/1.1 404 Not Found
27+
405:HTTP/1.1 405 Method Not Allowed
28+
406:HTTP/1.1 406 Not Acceptable
29+
407:HTTP/1.1 407 Proxy Authentication Required
30+
408:HTTP/1.1 408 Request Timeout
31+
409:HTTP/1.1 409 Conflict
32+
410:HTTP/1.1 410 Gone
33+
411:HTTP/1.1 411 Length Required
34+
412:HTTP/1.1 412 Precondition Failed
35+
413:HTTP/1.1 413 Request Entity Too Large
36+
414:HTTP/1.1 414 Request-URI Too Long
37+
415:HTTP/1.1 415 Unsupported Media Type
38+
416:HTTP/1.1 416 Requested Range Not Satisfiable
39+
417:HTTP/1.1 417 Expectation Failed
40+
421:HTTP/1.1 421 too many connections
41+
422:HTTP/1.1 422 Unprocessable Entity
42+
423:HTTP/1.1 423 Locked
43+
424:HTTP/1.1 424 Failed Dependency
44+
425:HTTP/1.1 425 Unordered Collection
45+
426:HTTP/1.1 426 Upgrade Required
46+
449:HTTP/1.1 449 Retry With
47+
451:HTTP/1.1 451 Unavailable For Legal Reasons
48+
//CodeServerFail
49+
500:HTTP/1.1 500 Internal Server Error
50+
501:HTTP/1.1 501 Not Implemented
51+
502:HTTP/1.1 502 Bad Gateway
52+
503:HTTP/1.1 503 Service Unavailable
53+
504:HTTP/1.1 504 Gateway Timeout
54+
505:HTTP/1.1 505 HTTP Version Not Supported
55+
506:HTTP/1.1 506 Variant Also Negotiates
56+
507:HTTP/1.1 507 Insufficient Storage
57+
508:HTTP/1.1 509 Bandwidth Limit Exceeded
58+
600:HTTP/1.1 600 Unparseable Response Headers
59+
//CodeUser
60+
1001:HTTP/1.1 1001 XEngine Auth Ok
61+
1002:HTTP/1.1 1002 XEngine Auth Failed

XEngine_Release/XEngine_Config/XEngine_Config.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
"SQLPass": "123123Ruiyue"
3737
},
3838
"XStorage": {
39-
"nSendMode": 2,
39+
"bResumable": 1,
4040
"nHashMode": 2,
4141
"bRename": 0,
42-
"tszFileDir": "/home/ubuntu/桌面/XEngine_Storage/XEngine_Source/Debug/XEngine_File"
42+
"tszFileDir": "./XEngine_File"
4343
},
4444
"XProxy": {
4545
"XProxyAuth": {
@@ -68,7 +68,8 @@
6868
},
6969
"XVer": {
7070
"StorageVersion": [
71-
"2.4.0.1001 Build20210917",
71+
"2.5.0.1001 Build20210930",
72+
"2.4.0.1001 Build20210918",
7273
"2.3.0.1001 Build20210903",
7374
"2.2.0.1001 Build20210820",
7475
"2.1.0.1001 Build20210805",

XEngine_SQLFile/XEngine.sql

Lines changed: 0 additions & 52 deletions
This file was deleted.

XEngine_SQLFile/XStorage_Create.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
*/
44

55

6-
CREATE DATABASE `XEngine` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_general_ci;
76
CREATE DATABASE `XEngine_Storage` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_general_ci;

XEngine_Source/StorageModule_Config/Config_Define.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ typedef struct tag_XEngine_ServerConfig
6464
struct
6565
{
6666
BOOL bRename;
67-
int nSendMode;
67+
BOOL bResumable;
6868
int nHashMode;
6969
TCHAR tszFileDir[MAX_PATH];
7070
}st_XStorage;

XEngine_Source/StorageModule_Config/Config_Json/Config_Json.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
133133
}
134134
Json::Value st_JsonXStorage = st_JsonRoot["XStorage"];
135135
pSt_ServerConfig->st_XStorage.nHashMode = st_JsonXStorage["nHashMode"].asInt();
136-
pSt_ServerConfig->st_XStorage.nSendMode = st_JsonXStorage["nSendMode"].asInt();
136+
pSt_ServerConfig->st_XStorage.bResumable = st_JsonXStorage["bResumable"].asInt();
137137
pSt_ServerConfig->st_XStorage.bRename = st_JsonXStorage["bRename"].asInt();
138138
_tcscpy(pSt_ServerConfig->st_XStorage.tszFileDir, st_JsonXStorage["tszFileDir"].asCString());
139139

XEngine_Source/StorageModule_Session/Session_Define.h

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ typedef struct
2020
__int64x ullCount; //总大小
2121
__int64x ullRWCount; //读取(写入)总大小
2222
__int64x ullRWLen; //已经读取(写入)的大小
23+
__int64x ullFSize; //文件真实大小
2324
__int64x ullPosStart; //开始位置
2425
__int64x ullPosEnd; //结束位置
2526
int nErrorTime; //错误次数
@@ -255,12 +256,17 @@ extern "C" BOOL Session_DLStroage_Delete(LPCTSTR lpszClientAddr);
255256
/********************************************************************
256257
函数名称:Session_UPStroage_Init
257258
函数功能:初始化上传会话管理器
259+
参数.一:bUPResume
260+
In/Out:In
261+
类型:逻辑型
262+
可空:Y
263+
意思:是否启用断点上传
258264
返回值
259265
类型:逻辑型
260266
意思:是否成功
261267
备注:
262268
*********************************************************************/
263-
extern "C" BOOL Session_UPStroage_Init();
269+
extern "C" BOOL Session_UPStroage_Init(BOOL bUPResume = FALSE);
264270
/********************************************************************
265271
函数名称:Session_UPStroage_Destory
266272
函数功能:销毁下载管理器
@@ -310,25 +316,6 @@ extern "C" BOOL Session_UPStroage_Destory();
310316
*********************************************************************/
311317
extern "C" BOOL Session_UPStroage_Insert(LPCTSTR lpszClientAddr, LPCTSTR lpszFileDir, __int64x nFileSize, __int64x nLeftCount, int nPosStart = 0, int nPostEnd = 0);
312318
/********************************************************************
313-
函数名称:Session_UPStroage_GetComplete
314-
函数功能:接受的数据是否完毕
315-
参数.一:lpszClientAddr
316-
In/Out:In
317-
类型:常量字符指针
318-
可空:N
319-
意思:输入要操作的客户端
320-
参数.二:pbComplete
321-
In/Out:Out
322-
类型:逻辑型指针
323-
可空:N
324-
意思:输出是否完成
325-
返回值
326-
类型:逻辑型
327-
意思:是否成功
328-
备注:
329-
*********************************************************************/
330-
extern "C" BOOL Session_UPStroage_GetComplete(LPCTSTR lpszClientAddr, BOOL* pbComplete);
331-
/********************************************************************
332319
函数名称:Session_UPStroage_GetInfo
333320
函数功能:获取上传客户端信息
334321
参数.一:lpszClientAddr
@@ -417,4 +404,18 @@ extern "C" BOOL Session_UPStorage_GetAll(SESSION_STORAGEINFO*** pppSt_StorageInf
417404
意思:是否成功
418405
备注:
419406
*********************************************************************/
420-
extern "C" BOOL Session_UPStroage_Delete(LPCTSTR lpszClientAddr);
407+
extern "C" BOOL Session_UPStroage_Delete(LPCTSTR lpszClientAddr);
408+
/********************************************************************
409+
函数名称:Session_UPStroage_Close
410+
函数功能:关闭读写文件句柄
411+
参数.一:lpszClientAddr
412+
In/Out:In
413+
类型:常量字符指针
414+
可空:N
415+
意思:要关闭的客户端会话
416+
返回值
417+
类型:逻辑型
418+
意思:是否成功
419+
备注:
420+
*********************************************************************/
421+
extern "C" BOOL Session_UPStroage_Close(LPCTSTR lpszClientAddr);

0 commit comments

Comments
 (0)