mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-15 01:10:52 +08:00
Merge https://github.com/acl-dev/acl into HEAD
This commit is contained in:
commit
dd97d48a75
@ -108,7 +108,6 @@ if (${UNIX_OS})
|
|||||||
"-D_POSIX_PTHREAD_SEMANTICS"
|
"-D_POSIX_PTHREAD_SEMANTICS"
|
||||||
"-DACL_PREPARE_COMPILE"
|
"-DACL_PREPARE_COMPILE"
|
||||||
"-Wstrict-prototypes"
|
"-Wstrict-prototypes"
|
||||||
"-fvisibility=hidden"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (CMAKE_COMPILER_IS_GNUCC)
|
if (CMAKE_COMPILER_IS_GNUCC)
|
||||||
@ -158,7 +157,6 @@ else()
|
|||||||
set(CMAKE_SHARED_LINKER_FLAGS "/DYNAMICBASE ws2_32.lib IPHlpApi.lib")
|
set(CMAKE_SHARED_LINKER_FLAGS "/DYNAMICBASE ws2_32.lib IPHlpApi.lib")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# set(CMAKE_SHARED_LINKER_FLAGS "-fvisibility=hidden")
|
|
||||||
set(lib_output_path ${PROJECT_BINARY_DIR}/lib)
|
set(lib_output_path ${PROJECT_BINARY_DIR}/lib)
|
||||||
set(LIBRARY_OUTPUT_PATH ${lib_output_path})
|
set(LIBRARY_OUTPUT_PATH ${lib_output_path})
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${lib_output_path})
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${lib_output_path})
|
||||||
|
@ -244,6 +244,7 @@
|
|||||||
0779D5F01DBE073000449438 /* acl_xml_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 0779D4B21DBE070E00449438 /* acl_xml_parse.c */; };
|
0779D5F01DBE073000449438 /* acl_xml_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 0779D4B21DBE070E00449438 /* acl_xml_parse.c */; };
|
||||||
0779D5F11DBE073000449438 /* acl_xml_util.c in Sources */ = {isa = PBXBuildFile; fileRef = 0779D4B31DBE070E00449438 /* acl_xml_util.c */; };
|
0779D5F11DBE073000449438 /* acl_xml_util.c in Sources */ = {isa = PBXBuildFile; fileRef = 0779D4B31DBE070E00449438 /* acl_xml_util.c */; };
|
||||||
70BD6B8B232B931700E4C798 /* acl_sane_bind.c in Sources */ = {isa = PBXBuildFile; fileRef = 0779D3F91DBE070E00449438 /* acl_sane_bind.c */; };
|
70BD6B8B232B931700E4C798 /* acl_sane_bind.c in Sources */ = {isa = PBXBuildFile; fileRef = 0779D3F91DBE070E00449438 /* acl_sane_bind.c */; };
|
||||||
|
70BD6CA8233520C600E4C798 /* acl_sane_accept.c in Sources */ = {isa = PBXBuildFile; fileRef = 70BD6CA7233520C600E4C798 /* acl_sane_accept.c */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
@ -650,6 +651,7 @@
|
|||||||
07A469F61E6FD4FA002C9B3C /* acl_xml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acl_xml.h; sourceTree = "<group>"; };
|
07A469F61E6FD4FA002C9B3C /* acl_xml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acl_xml.h; sourceTree = "<group>"; };
|
||||||
07A469F71E6FD4FA002C9B3C /* acl_xml2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acl_xml2.h; sourceTree = "<group>"; };
|
07A469F71E6FD4FA002C9B3C /* acl_xml2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acl_xml2.h; sourceTree = "<group>"; };
|
||||||
07A469F81E6FD4FA002C9B3C /* acl_xml3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acl_xml3.h; sourceTree = "<group>"; };
|
07A469F81E6FD4FA002C9B3C /* acl_xml3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = acl_xml3.h; sourceTree = "<group>"; };
|
||||||
|
70BD6CA7233520C600E4C798 /* acl_sane_accept.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = acl_sane_accept.c; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@ -932,6 +934,7 @@
|
|||||||
0779D3F61DBE070E00449438 /* listen */ = {
|
0779D3F61DBE070E00449438 /* listen */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
70BD6CA7233520C600E4C798 /* acl_sane_accept.c */,
|
||||||
0779D3F71DBE070E00449438 /* acl_fifo_listen.c */,
|
0779D3F71DBE070E00449438 /* acl_fifo_listen.c */,
|
||||||
0779D3F81DBE070E00449438 /* acl_inet_listen.c */,
|
0779D3F81DBE070E00449438 /* acl_inet_listen.c */,
|
||||||
0779D3F91DBE070E00449438 /* acl_sane_bind.c */,
|
0779D3F91DBE070E00449438 /* acl_sane_bind.c */,
|
||||||
@ -1716,6 +1719,7 @@
|
|||||||
0779D5A31DBE073000449438 /* acl_write_wait.c in Sources */,
|
0779D5A31DBE073000449438 /* acl_write_wait.c in Sources */,
|
||||||
0779D5A41DBE073000449438 /* acl_allocator.c in Sources */,
|
0779D5A41DBE073000449438 /* acl_allocator.c in Sources */,
|
||||||
0779D5A51DBE073000449438 /* acl_dbuf_pool.c in Sources */,
|
0779D5A51DBE073000449438 /* acl_dbuf_pool.c in Sources */,
|
||||||
|
70BD6CA8233520C600E4C798 /* acl_sane_accept.c in Sources */,
|
||||||
0779D5A61DBE073000449438 /* acl_default_malloc.c in Sources */,
|
0779D5A61DBE073000449438 /* acl_default_malloc.c in Sources */,
|
||||||
0779D5A71DBE073000449438 /* acl_malloc_glue.c in Sources */,
|
0779D5A71DBE073000449438 /* acl_malloc_glue.c in Sources */,
|
||||||
0779D5A81DBE073000449438 /* acl_mem_hook.c in Sources */,
|
0779D5A81DBE073000449438 /* acl_mem_hook.c in Sources */,
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
修改历史列表:
|
修改历史列表:
|
||||||
|
|
||||||
|
591) 2019.9.24
|
||||||
|
591.1) compile: 使用 cmake 编译的 .so 库不能正常使用,原因是使用了 -fvisibility=hidden
|
||||||
|
编译选项
|
||||||
|
|
||||||
590) 2019.9.17
|
590) 2019.9.17
|
||||||
590.1) bugfix: 在客户端模式下,需要在 http_aclient::ws_handshake() 中需要调用
|
590.1) bugfix: 在客户端模式下,需要在 http_aclient::ws_handshake() 中需要调用
|
||||||
set_frame_masking_key() 设置客户端发送数据的掩码
|
set_frame_masking_key() 设置客户端发送数据的掩码
|
||||||
|
@ -308,7 +308,7 @@ public:
|
|||||||
* @return {bool} 操作是否成功,当出错或 key 不存在时返回 false
|
* @return {bool} 操作是否成功,当出错或 key 不存在时返回 false
|
||||||
* true on success, or false be returned
|
* true on success, or false be returned
|
||||||
*/
|
*/
|
||||||
bool randmkey(string& buf);
|
bool randomkey(string& buf);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将 key 改名为 newkey
|
* 将 key 改名为 newkey
|
||||||
|
@ -958,6 +958,11 @@ bool db_mysql::commit(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool db_mysql::rollback(void)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int db_mysql::affect_count(void) const
|
int db_mysql::affect_count(void) const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -691,6 +691,11 @@ bool db_pgsql::commit()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool db_pgsql::rollback(void)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int db_pgsql::affect_count() const
|
int db_pgsql::affect_count() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -785,6 +785,8 @@ bool db_sqlite::set_conf(const char*) { return false; }
|
|||||||
const char* db_sqlite::get_conf(const char*, string&) { return NULL; }
|
const char* db_sqlite::get_conf(const char*, string&) { return NULL; }
|
||||||
void db_sqlite::show_conf(const char*) {}
|
void db_sqlite::show_conf(const char*) {}
|
||||||
int db_sqlite::affect_total_count() const { return 0; }
|
int db_sqlite::affect_total_count() const { return 0; }
|
||||||
|
bool db_sqlite::begin_transaction(void) { return false; }
|
||||||
|
bool db_sqlite::commit(void) { return false; }
|
||||||
const char* db_sqlite::dbtype() const { return NULL; }
|
const char* db_sqlite::dbtype() const { return NULL; }
|
||||||
bool db_sqlite::dbopen(const char*) { return false; }
|
bool db_sqlite::dbopen(const char*) { return false; }
|
||||||
bool db_sqlite::is_opened() const { return false; }
|
bool db_sqlite::is_opened() const { return false; }
|
||||||
|
@ -299,7 +299,7 @@ long long int redis_key::pttl(const char* key)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool redis_key::randmkey(string& buf)
|
bool redis_key::randomkey(string& buf)
|
||||||
{
|
{
|
||||||
const char* argv[1];
|
const char* argv[1];
|
||||||
size_t lens[1];
|
size_t lens[1];
|
||||||
|
@ -74,7 +74,6 @@ if (${UNIX_OS})
|
|||||||
"-D_POSIX_PTHREAD_SEMANTICS"
|
"-D_POSIX_PTHREAD_SEMANTICS"
|
||||||
"-DACL_PREPARE_COMPILE"
|
"-DACL_PREPARE_COMPILE"
|
||||||
"-Wstrict-prototypes"
|
"-Wstrict-prototypes"
|
||||||
"-fvisibility=hidden"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# if (CMAKE_BUILD_TYPE STREQUAL "")
|
# if (CMAKE_BUILD_TYPE STREQUAL "")
|
||||||
|
@ -150,7 +150,7 @@ HTTP_API int http_util_req_open(HTTP_UTIL *http_util);
|
|||||||
* @param http_util {HTTP_UTIL*}
|
* @param http_util {HTTP_UTIL*}
|
||||||
* @param data {const char*} 本次发送的数据地址,必须非空
|
* @param data {const char*} 本次发送的数据地址,必须非空
|
||||||
* @param dlen {size_t} data 数据长度, 必须大于 0
|
* @param dlen {size_t} data 数据长度, 必须大于 0
|
||||||
* @param {int} > 0 表示本次成功发送的数据; -1: 表示发送数据失败, 应调用
|
* @return {int} > 0 表示本次成功发送的数据; -1: 表示发送数据失败, 应调用
|
||||||
* http_util_free 关闭网络流且释放内存资源
|
* http_util_free 关闭网络流且释放内存资源
|
||||||
*/
|
*/
|
||||||
HTTP_API int http_util_put_req_data(HTTP_UTIL *http_util, const char *data, size_t dlen);
|
HTTP_API int http_util_put_req_data(HTTP_UTIL *http_util, const char *data, size_t dlen);
|
||||||
@ -215,7 +215,7 @@ HTTP_API int http_util_get_res_body(HTTP_UTIL *http_util, char *buf, size_t size
|
|||||||
* 将某个 url 的响应体数据转储至某个文件中
|
* 将某个 url 的响应体数据转储至某个文件中
|
||||||
* @param url {const char*} 完整请求 url, 如: http://www.g.cn
|
* @param url {const char*} 完整请求 url, 如: http://www.g.cn
|
||||||
* @param dump {const char*} 转储文件名
|
* @param dump {const char*} 转储文件名
|
||||||
* @param {int} 读到的响应体数据长度, >=0: 表示成功, -1: 表示失败
|
* @return {int} 读到的响应体数据长度, >=0: 表示成功, -1: 表示失败
|
||||||
*/
|
*/
|
||||||
HTTP_API int http_util_dump_url(const char *url, const char *dump);
|
HTTP_API int http_util_dump_url(const char *url, const char *dump);
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ HTTP_API int http_util_dump_url(const char *url, const char *dump);
|
|||||||
* 将某个 url 的响应体数据转储至某个流中
|
* 将某个 url 的响应体数据转储至某个流中
|
||||||
* @param url {const char*} 完整请求 url, 如: http://www.g.cn
|
* @param url {const char*} 完整请求 url, 如: http://www.g.cn
|
||||||
* @param stream {ACL_VSTREAM *} 转储流
|
* @param stream {ACL_VSTREAM *} 转储流
|
||||||
* @param {int} 读到的响应体数据长度, >=0: 表示成功, -1: 表示失败
|
* @return {int} 读到的响应体数据长度, >=0: 表示成功, -1: 表示失败
|
||||||
*/
|
*/
|
||||||
HTTP_API int http_util_dump_url_to_stream(const char *url, ACL_VSTREAM *stream);
|
HTTP_API int http_util_dump_url_to_stream(const char *url, ACL_VSTREAM *stream);
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ SMTP_API int smtp_send_file(SMTP_CLIENT *client, const char *filepath);
|
|||||||
/**
|
/**
|
||||||
* 向 SMTP 服务器发送给定文件流的邮件内容
|
* 向 SMTP 服务器发送给定文件流的邮件内容
|
||||||
* @param client {SMTP_CLIENT*} SMTP 连接对象
|
* @param client {SMTP_CLIENT*} SMTP 连接对象
|
||||||
* @param int {ACL_VSTREAM*} 邮件文件输入流
|
* @param in {ACL_VSTREAM*} 邮件文件输入流
|
||||||
* @return {int} 0 表示成功(SMTP_CLIENT::smtp_code 表示返回码,
|
* @return {int} 0 表示成功(SMTP_CLIENT::smtp_code 表示返回码,
|
||||||
* SMTP_CLIENT::buf 存储响应内容),否则表示出错,应该关闭连接对象
|
* SMTP_CLIENT::buf 存储响应内容),否则表示出错,应该关闭连接对象
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user