Commit Graph

616 Commits

Author SHA1 Message Date
zhengshuxin
f505f526b8 build ok by gcc10 2020-06-12 15:37:11 +08:00
shuxin   zheng
7f13a285c6 optimize memory debug process 2020-06-12 15:14:26 +08:00
shuxin   zheng
c14108e3a3 add memory leaking debug module: see lib_acl_cpp/include/acl_cpp/stdlib/malloc.hpp. 2020-06-12 14:21:41 +08:00
shuxin   zheng
175d852ea5 add more options for zadd in redis_zset 2020-06-07 21:47:59 +08:00
zhengshuxin
b5173f228f add HVALS command in redis_hash 2020-05-22 13:37:49 +08:00
shuxin   zheng
ba26b15032 export bmp_ in bitmap 2020-05-19 18:20:48 +08:00
shuxin   zheng
53d97b221c add some methos in redis_key class 2020-05-19 12:47:50 +08:00
shuxin   zheng
15e48b11b6 expand the bitmap's function 2020-05-19 12:03:24 +08:00
shuxin   zheng
8130e91886 format code style 2020-05-09 23:31:44 +08:00
wii
2868c572ed Redis String cmd:"SET key value [EX seconds] [PX milliseconds] [NX|XX]"支持 2020-05-09 16:22:51 +08:00
shuxin   zheng
3d7737628f fixed compiling warning by xcode 2020-05-07 10:55:14 +08:00
shuxin   zheng
880f7e75f8 format code 2020-04-15 08:54:46 +08:00
shuxin   zheng
5fb7805729 Merge branch 'upstream-master' 2020-03-14 20:55:54 +08:00
shuxin   zheng
d87b1c4e64 add test sample http_request_manager for testing fiber and connect_manager. 2020-03-14 20:52:16 +08:00
shuxin   zheng
66112452f3 decrease libs' size by skipping __FILE__ in logger macro. 2020-02-25 16:08:20 +08:00
shuxin   zheng
6a13e7c3a2 make ssl module more easy 2020-01-12 19:41:29 +08:00
郑树新
910a313ae2 load mbedtls in one or threee libs 2020-01-07 18:33:44 +08:00
shuxin   zheng
a0a8a0ef4c compiling mbedtls for vc 2020-01-07 09:18:57 +08:00
shuxin   zheng
4a7dce51ba acl::mbedtls_conf can load three mbedtls dynamic libs 2020-01-06 15:29:03 +08:00
shuxin   zheng
59955b5b23 test acl using mbedtls ok! 2020-01-02 23:29:06 +08:00
郑树新
b2ec46671a build for windows ok 2019-12-20 15:30:02 +08:00
shuxin   zheng
be1ff25ee1 test mbedtls 2019-12-20 15:08:36 +08:00
shuxin   zheng
d8518893b2 use sslbase_conf/sslbase_io other than polarssl_conf/polarssl_io 2019-12-18 11:40:41 +08:00
shuxin   zheng
7c86d76c33 add sslbase_io/sslbase_conf for compatiable with more ssl libs. 2019-12-18 11:22:54 +08:00
shuxin   zheng
c6c9eaa47e add mbedtls into vc projects 2019-12-17 18:30:49 +08:00
shuxin   zheng
6135813d6c add reactor mode for aio_listen_stream 2019-12-12 15:29:58 +08:00
shuxin   zheng
49ef1a29a8 add comments 2019-12-12 10:57:29 +08:00
shuxin   zheng
a102fba468 fixed bug in frame_header for init 2019-12-10 13:31:07 +08:00
shuxin   zheng
a0d17357ec add more function for aio_listen_stream class 2019-12-03 14:45:11 +08:00
shuxin   zheng
fba11d437e fixed comments error 2019-11-09 22:39:43 +08:00
zhengshuxin
5f415f1302 add ssl enable/disable switch for http_aclient 2019-10-18 10:03:52 +08:00
zhengshuxin
76ba04380d add ssl enable/disable switch for http_aclient 2019-10-18 10:02:22 +08:00
zhengshuxin
1e99026a6e rename randmkey to randomkey in redis_key 2019-09-20 18:40:16 +08:00
zhengshuxin
4ac0748114 set_frame_masking_key() should be called in http_aclient::ws_handshake() in client mode. 2019-09-17 16:51:43 +08:00
郑树新
8cd92eadf8 fixed one compiling error by vc 2019-09-17 11:29:06 +08:00
shuxin   zheng
a8230ddd7c add waiting timeout for redis_pubsub::get_message() 2019-09-16 22:30:40 +08:00
shuxin   zheng
023cd46ed2 fixed bugs in get_peer()/get_local() in aio_stream class 2019-09-16 21:55:14 +08:00
shuxin   zheng
d1fb7e888a fixed parameters comments warning in headers found by xcode 2019-09-13 19:47:23 +08:00
zhengshuxin
a87c8d046c support 302, 301 redirect in http module 2019-08-28 11:18:18 +08:00
zhengshuxin
f552c6aef8 decrease http_aclient's size 2019-08-21 17:54:35 +08:00
郑树新
8f4fd32fc0 add on_ns_failed() callback for http_aclient when nslookup failed. 2019-08-21 17:42:07 +08:00
zhengshuxin
56f66e2688 optimize class variables to decrease the size of class object. 2019-08-20 17:17:37 +08:00
zsxxsz
46b4bcd63c add some functions for DNS operations 2019-08-13 21:55:34 +08:00
zhengshuxin
a53b9d36ff dns resolving and aio connect are ok when using multiple DNS server. 2019-08-13 18:29:40 +08:00
zhengshuxin
03896a6a12 websocket key for server side 2019-08-09 22:36:54 +08:00
zhengshuxin
7bcb88ae3c optimize websocket handshake. 2019-08-09 22:22:55 +08:00
zhengshuxin
a347debcfa ws key 2019-08-09 19:02:38 +08:00
zhengshuxin
a43648f379 ws_key created 2019-08-09 18:50:10 +08:00
zhengshuxin
6eba8bbafd ws key should be base64 encoded in http_header::set_ws_key() 2019-08-09 18:05:51 +08:00
zhengshuxin
7ded499111 url_coder supports value is NULL or empty 2019-08-08 16:13:05 +08:00
郑树新
d9e2cf574a add get_status() method in http_header.hpp for getting the http response
status from http server
2019-08-07 17:16:14 +08:00
郑树新
272727f104 add ACL_CPP_API on acl::atomic 2019-08-01 16:27:02 +08:00
郑树新
a1ec482d94 use acl::atomic_long in DLL on windows 2019-08-01 16:19:51 +08:00
zhengshuxin
9697f95b8f Revert "All source code have been changed to use utf8 charset with BOM header!"
This reverts commit 15d999759e.
2019-07-28 10:31:56 +08:00
zsxxsz
15d999759e All source code have been changed to use utf8 charset with BOM header! 2019-07-27 22:44:32 +08:00
zhengshuxin
498e0537dd add new features in fstream/ofstream/ifstream 2019-07-24 16:12:58 +08:00
zhengshuxin
23f97bdd4f HttpServletRequest won't discard body_parse_ and will read request body when user calls getJson/getXml. 2019-07-20 16:14:09 +08:00
zhengshuxin
92ad11180a polarssl_io can be deleted when reference is zero. 2019-07-12 11:05:17 +08:00
zhengshuxin
8280209e71 add acl_vstream_read_peek3 2019-07-08 22:08:26 +08:00
zhengshuxin
c5fbe9ede4 format c++ code style. 2019-07-07 13:27:58 +08:00
zhengshuxin
87c1bc8028 format c++ code style. 2019-07-07 11:00:12 +08:00
zhengshuxin
190be40459 optimize HTTP module for supporting HTTP/1.1 2019-07-04 16:32:57 +08:00
郑树新
cff0958e2c
Merge branch 'master' into master 2019-06-26 22:52:56 +08:00
zhengshuxin
1fb167d560 remove some useless comments 2019-06-24 11:58:19 +08:00
zhengshuxin
996574d860 add more comments for http_client 2019-06-23 20:56:49 +08:00
zhengshuxin
f0bcc98a1e acl::string supports concatenating multiple string or object of POD type. 2019-06-20 17:54:22 +08:00
meihouhao2017
0261775380 support PATCH method of http. 2019-06-18 11:00:58 +08:00
zhengshuxin
ab407a51dc http_header supports getting/setting cookies for request and response. 2019-06-12 23:25:35 +08:00
zhengshuxin
55e29c55b3 aio_istream/aio_ostream can be created with socket fd. 2019-06-11 23:16:03 +08:00
zhengshuxin
fae5f0aee6 format c++ code style. 2019-06-10 16:34:23 +08:00
zhengshuxin
8ab1c2fb6a http_aclient supports unzipping compressed data from server's response. 2019-06-10 16:08:21 +08:00
zhengshuxin
7ae938030e test websocket samples 2019-06-10 13:00:25 +08:00
zhengshuxin
16f37938b0 add websocket supporting in http_aclient 2019-06-09 22:46:07 +08:00
zhengshuxin
132322015f SSL communication has been supported in redis client module. 2019-06-08 14:06:22 +08:00
zhengshuxin
1958bb4229 optimize http_aclient and websocket 2019-06-06 23:43:04 +08:00
zhengshuxin
624f828575 optimize http_aclient 2019-06-06 13:46:23 +08:00
zhengshuxin
88b60dfa8a http_aclient ok! 2019-06-05 17:48:52 +08:00
zhengshuxin
7d85364bc6 add http_aclient for getting http response from webserver in aio mode. 2019-06-05 17:36:47 +08:00
zhengshuxin
288986fdac optimize http module for http request 2019-06-04 14:51:21 +08:00
zhengshuxin
7a22252ab2 remove noncopyable from dbuf_guard/dbuf_pool 2019-05-31 18:34:28 +08:00
郑树新
b20b7bacb7 db module support getting length of field value 2019-05-27 12:11:30 +08:00
zhengshuxin
b1b7d08a0c compiling optimization to get smaller library's size 2019-05-19 16:54:20 +08:00
zsxxsz
53583d8a9d add compiling macro option ACL_CLIENT_ONLY to decrease the library's size for
client software.
2019-05-18 21:19:21 +08:00
zhengshuxin
0c89422256 redis_stream.cpp: optimize READGROUP/XREAD commands. 2019-05-14 11:28:55 +08:00
郑树新
9b4d238793 compiling ok on vc 2019-05-09 14:30:45 +08:00
zhengshuxin
8b77b0456a safety & feature: add nocopyable limit for many class to avoid potential problem 2019-05-09 13:57:51 +08:00
zhengshuxin
d62bb45cd6 tcp_keeper: fixed one bug in keeper_conn.cpp;
server_socket: remove one constructur method;
2019-04-28 16:17:17 +08:00
zsxxsz
ede94861d2 add zpopmin/zpopmax/bzpopmin/bzpopmax in redis_redis 2019-04-27 21:23:12 +08:00
zhengshuxin
b41612415c add comments 2019-03-28 11:18:10 +08:00
郑树新
75382fd8fd Merge branch 'master' into 'master'
Compatible with application/json and application/xml in http

See merge request !4
2019-03-14 16:17:39 +08:00
zsx
0dfd2d45c7 add tbox_array.hpp and tbox sample. 2019-03-13 10:28:51 +08:00
liqiang01
603ff28580 Compatible with application/json and application/xml in http 2019-03-06 20:13:13 +08:00
zsx
4934df5291 scan_dir::rmdir_callback: rmdir the empty directory as default 2019-02-02 14:18:17 +08:00
zsx
74369b46dc scan_dir: empty directory can be removed when scanning directories 2019-02-01 18:47:19 +08:00
zsx
3b4b19a542 fixed bugs in scan_dir module 2019-02-01 13:49:27 +08:00
zsx
64d1c2458b thread::start: add sync start thread way 2019-01-30 16:43:02 +08:00
zhengshuxin
2081b206c2 set free_obj's default value to true 2019-01-02 11:25:17 +08:00
zsx
5bb7daf807 tcp_keeper: add ttl controling for connection and connections pools;
http_request/http_client add controling parameters
2018-12-29 15:42:03 +08:00
zsx
6d3b542e4f move connect_pool::reset_statistics's implement to source code from header 2018-12-28 13:52:30 +08:00
zsx
0004373bcd fixed bugs of acl_fiber_cond_timedwait in acl_fiber_cond.c 2018-12-25 11:32:42 +08:00
zsx
c89341b77b optimize connect_pool 2018-12-19 13:31:46 +08:00
zsxxsz
d9bdd8aac6 restructure connect_manager for supporting fiber 2018-12-16 14:12:50 +08:00
zsxxsz
80461d5c51 optimize connect_manager 2018-12-15 23:32:41 +08:00
郑树新
c97297b00c connect manager 2018-12-14 20:25:10 +08:00
郑树新
fdf69ce9a4 connect_manager improvment 2018-12-14 20:19:19 +08:00
zsx
e82b63b025 format code style 2018-12-12 11:16:12 +08:00
zsx
e8028180cf expand redis_stream::xadd with subcommand MAXLEN 2018-12-11 15:29:35 +08:00
zsx
be9863f203 add comments for redis_stream module. 2018-12-11 14:06:53 +08:00
郑树新
ca7d64f263 vc2013 project for libfiber 2018-12-07 11:08:19 +08:00
zsx
66a560e37f fixed bugs in client_wakeup of acl_threads_server.c;
acl::fiber_tbox and acl::fiber_cond are ok.
2018-12-06 15:50:13 +08:00
zsx
45dc0ee481 fixed one bug for websocket module 2018-12-02 21:28:03 +08:00
zhengshuxin
b83df7ba49 add README.md 2018-12-02 21:05:46 +08:00
zhengshuxin
ff5bc053b9 redis_stream benchmark testing 2018-12-02 20:15:27 +08:00
zhengshuxin
7fbcd4d56b testing acl::redis_stream ok! 2018-12-02 14:58:41 +08:00
zsx
33535e8b6f add task_qlen and threads_pool in master_threads 2018-11-28 20:50:31 +08:00
zhengshuxin
fafce8ce67 testing acl::redis_stream 2018-11-25 23:16:25 +08:00
zsx
7a934e149c One bug in sha1 was fixed by dawei.lin@net263.com. 2018-11-22 22:18:25 +08:00
zsx
7683a7bc2e add redis_stream into IDE projects for vc and xcode. 2018-11-16 13:28:55 +08:00
zhengshuxin
26cd06ba65 add supporting for XCLAIM redis command. 2018-11-14 23:24:32 +08:00
zsx
c4cafbebc1 adding redis stream ... 2018-11-14 19:00:58 +08:00
zhengshuxin
72a71f878d adding xpending ... 2018-11-11 23:04:33 +08:00
zhengshuxin
8c0b4e79d3 add redis_stream::xinfo command 2018-11-11 21:59:52 +08:00
zhengshuxin
ac361045fd adding xinfo in redis_stream. 2018-11-11 09:14:23 +08:00
zhengshuxin
a4040edd93 redis_stream: add more commands including "XTRIM, XDEL, XRANGE, XREVRANGE, XLEN, XACK" 2018-11-08 23:09:14 +08:00
zhengshuxin
5abbaa1a8b redis_stream: implement XREADGROUP command. 2018-11-07 23:20:44 +08:00
zhengshuxin
c201fd13af supporting redis-stream ... 2018-11-06 00:03:52 +08:00
zhengshuxin
d453e86828 websocket::send_frame_data can be called multiple. 2018-10-20 22:43:08 +08:00
zhengshuxin
7b343621e0 after the connection with redis-server is created, the dbnum can be selected in acl::redis_client, acl::redis_client_pool. 2018-10-20 22:20:57 +08:00
zhengshuxin
1ec33ddd2b format code style 2018-10-20 20:36:08 +08:00
zhengshuxin
f4ed8742fb fixed bugs in websocket::read_frame_data and WebSocketServlet.cpp. 2018-10-20 00:30:02 +08:00
zsx
c949a3be7a add proc_on_unbind in master_udp 2018-10-08 16:32:44 +08:00
zhengshuxin
e00cd9391d add multiple constructor for server_socket to avoid compling error for some using cases. 2018-10-08 14:00:58 +08:00
zhengshuxin
b46fea21d4 add end_with in acl::string 2018-10-07 21:35:46 +08:00
zsx
97fddf37a2 bugfix: acl_inet_connect_ex of acl_inet_connect.c should support domain:port format 2018-09-28 17:52:18 +08:00
zsxxsz
893facc629 add open flag for aio_listen_stream 2018-09-22 09:58:21 +08:00
zsxxsz
cb218497b6 add new flag to control if disable SO_REUSEADDR when binding the local
listening addr.
2018-09-22 09:40:33 +08:00
zsx
7847375f25 The acl_inet_ntop should use ':' as the seperate for IPV4, or the acl_udp_server.c will mismatch the changed IPV4 addrs;
The sstreams_ in master_udp.cpp should be protected by mutex avoiding multipule-threads change it in the same time.
2018-09-21 21:56:21 +08:00
zsx
f27af8b424 acl support IPV6 is OK now! 2018-09-16 21:49:58 +08:00
zsx
e9169c3489 compiling gson_helper ok for vc2005 by removing invalid declaration. 2018-09-04 17:08:20 +08:00
zsxxsz
8ebffc404a add sqlite_cursor for supporting the Sqlite's cursor operation. 2018-09-02 20:38:33 +08:00
zsx
2cd040b856 improvment the performance of acl::token_tree class;
add benchmark for token_tree.
2018-08-20 22:28:27 +08:00
zsx
92615556b4 there's some comments error in token_tree 2018-08-20 11:07:20 +08:00
zsxxsz
001dd3f0eb add create_delimiters_tab/free_delimiters_tab in class token_tree. 2018-08-19 22:36:18 +08:00
zsx
6f18301ac8 add token_tree class for 256-fork matching tree;
format the files with DOS format.
2018-08-19 15:31:26 +08:00
zsx
a90ebcf86e there are some changes in the interfaces's meaning of thread_cond::wait, server_socket::accept. 2018-08-17 16:50:30 +08:00
zsx
9d1c2e850b bugfix: json parser gson serialization can't handle empty array object. 2018-08-02 23:00:22 +08:00
zsx
85d77fe96c code style 2018-07-29 18:57:47 +08:00
zsx
0da7b9bd8a fixed one bug in tbox 2018-07-27 16:26:27 +08:00
zsx
2843c3197d tbox: support transfering NULL message 2018-07-27 13:26:07 +08:00
zsx
0c7b9b420e bugfix: json's serialization can't support double type with the integer type;
feature: add methods in acl::string which can use std::string.
2018-07-24 18:45:51 +08:00
zsx
37b326bd44 add file lock method in acl::fstream 2018-07-05 13:56:10 +08:00
zsx
33a4bdbb36 acl::thread's default status been set has been changed from detachable to joinable. 2018-06-29 09:42:27 +08:00
zhengshuxin
349b3bb728 tbox was rewritten with C++ template class 2018-06-28 21:40:24 +08:00
zhengshuxin
2aa9e0748d rewrite tbox with pure C++ template class 2018-06-28 21:04:54 +08:00
zsx
89e7df6406 there is one compiling error in serialize.hpp 2018-06-25 10:32:14 +08:00
zsx
2dd199ae67 add serialize.hpp that users can use gson module more easily. 2018-06-25 10:18:09 +08:00
zsx
16f5b7f964 thread_cond: compiling error for wait overriding 2018-06-19 18:22:46 +08:00
zsx
72f3d59b79 thread_cond::wait add locked parameter for one locking condition 2018-06-15 15:27:59 +08:00
zsx
d0d856c33f check_client: just choose one from on_refused and on_timeout to report connection status 2018-06-05 14:42:35 +08:00
zsx
bd32773edc connect_monitor: change params for on_refused and on_timeout methods 2018-06-05 14:09:46 +08:00
zsx
e4061f8f82 connect_monitor: add three callback for application to handle 2018-06-04 18:11:43 +08:00
郑树新
6176ef4b37 add on_connected/on_refused/on_timeout callbacks in connect_monitor 2018-06-04 18:00:32 +08:00
zhengshuxin
4f1958d796 fixed one problem in redis_key::renamenx about the incorrect type of the returned value. 2018-05-23 22:20:22 +08:00
zsx
4221226341 add features in redis_client_cluster & connect_manager 2018-05-14 15:28:39 +08:00
zhengshuxin
3053425333 fixed on bug in redis_pubsub.cpp when subscribe multi-channels in one connection 2018-05-06 17:23:07 +08:00
zhengshuxin
dcbd9224ef fixed one important bug in redis_command.cpp, don't call clear in run() method 2018-05-04 14:45:53 +08:00
郑树新
ff440103c3 http module: unsafe uri can be corrected internal. 2018-04-27 11:44:02 +08:00
zsx
d1ffac36cd one compiling warning by clang on MacOSX 2018-04-20 16:15:32 +08:00
郑树新
e35a0b00e7 change comment charset to gb18030 2018-04-19 15:33:16 +08:00
zsx
1236fe6652 add diff algorithm 2018-04-19 14:46:43 +08:00
zsx
10cdf2dbdf add const to atomic_long::value 2018-04-08 15:49:06 +08:00
zsx
3d7e929db4 let atomic_long::atomic_long(const atomic_long&) public 2018-04-08 15:46:48 +08:00
zsx
7afcf03ced add gson_helper.ipp in lib_acl.hpp 2018-04-03 15:48:13 +08:00
zsx
dfbe210589 add redis_role class 2018-03-22 19:13:47 +08:00
zsx
a425d406b5 add redis_role class 2018-03-22 19:06:32 +08:00
zsx
308c172654 add redis_role class 2018-03-22 19:04:42 +08:00
zsx
69b8095e48 add copy overriding in atomic_long 2018-03-20 11:54:58 +08:00
zsxxsz
919aabfa9c add redis_sentinel class in redis module 2018-03-18 23:43:31 +08:00
zsx
ab6e5fb2b7 add string header in server_socket.hpp 2018-02-13 18:03:24 +08:00
郑树新
87b2fd1508 redis_client.cpp: add authing_ for authing in dead loop. 2018-02-05 12:04:35 +08:00
zsx
7329f830e9 server_socket supports SO_REUSEPORT on Linux3.x 2018-01-29 23:33:49 +08:00
zsxxsz
768d30a56c fiber for windows OS can use IO read/write with timed waiting by using select/poll;
ACL_VSTREAM's NETWORK IO read/write interface can be hooked by user's IO API.
2018-01-14 22:54:44 +08:00
郑树新
5a45a0d886 win32 message fiber event 2018-01-11 19:13:31 +08:00
zsxxsz
2abefabbc8 add last_nready in aio_handle class getting the count of events. 2018-01-09 23:45:13 +08:00
zsx
344d370715 modify redis_node class for redis.4.x.x 2018-01-01 11:05:05 +08:00
zsx
e089381026 redis_cluster: support CLUSTER NODES for redis.4.x.x 2018-01-01 10:58:43 +08:00
zsx
612bced38d http_header::add_entry: add param replace for checking if replade the old exist value 2017-12-28 17:55:46 +08:00
zsx
fa113a12e7 acl stream and servers support UNIX domain socket in UDP packet mode 2017-12-10 22:23:37 +08:00
zsx
1b164db078 ssl: polarssl_conf's init should not in constructor 2017-12-07 16:24:21 +08:00
郑树新
a00a262f8a build ok on windows 2017-11-14 12:09:33 +08:00
zhengshuxin
781b0a048a add acl::tbox class for transfering messages between multi-threads. 2017-11-14 10:52:44 +08:00
zhengshuxin
46cc12739f compiling: fixed compiling error on vc 2017-10-27 16:33:56 +08:00
zhengshuxin
82b7fd1ca6 mbox class: copy constructor is denied. 2017-10-13 09:58:34 +08:00
zhengshuxin
1050d4e45f event_mutex: add event_mutex sample in fiber mode; testing event_mutex ok in threads & fibers running modes. 2017-10-08 00:06:12 +08:00
zhengshuxin
f3835a9844 add self() into thread.hpp 2017-10-06 23:19:37 +08:00
zhengshuxin
cf735fe123 add event_mutex into lib_acl_cpp, which can support threads & fibers
mutex by using IO + atomic as mutex
2017-10-06 23:05:14 +08:00
zhengshuxin
3d71e10668 fiber: fiber_lock can trigger immediately with IO event 2017-10-01 13:54:57 +08:00
zhengshuxin
563ce8a395 feature: thread_mutex supports recursive parameter;
feature: fiber_mutex supports thread_mutex;
2017-09-29 17:35:17 +08:00
zhengshuxin
0bb8cb9c6c format c++ code style 2017-09-26 11:48:09 +08:00
zhengshuxin
c57beda5df method name in bitmap class maybe collision with some macro on some platfom 2017-09-21 16:18:15 +08:00