Commit Graph

522 Commits

Author SHA1 Message Date
zhengshuxin
f5ae880e8e NON_BLOCKING shouldn't be set when creating one socket. 2022-01-21 18:04:30 +08:00
zhengshuxin
0344633fbd event_select should set wset in select() 2022-01-21 17:43:54 +08:00
zhengshuxin
16b2a60d20 fixed bugs that the connecting timeout process isn't available in fiber mode 2022-01-21 17:31:50 +08:00
zhengshuxin
e516804b78 fixed one bug in acl_fiber_delay() that the event loops too quickly for the event waiting timeout been set 0. 2021-11-23 17:40:37 +08:00
郑树新
72d6b1f0fc optimize and test iocp of fiber module. 2021-10-12 18:01:04 +08:00
郑树新
a8655cfb73 format code 2021-10-12 14:32:10 +08:00
shuxin   zheng
91474bbd3e build ok for Unix 2021-10-12 11:39:41 +08:00
郑树新
c43293a6ac optimize and test fiber event in iocp mode 2021-10-12 11:34:19 +08:00
郑树新
96a825025d optimize and test iocp mode in fiber module 2021-10-11 23:31:14 +08:00
郑树新
4af6484b9a optimize iocp event in fiber module. 2021-10-11 18:48:24 +08:00
郑树新
6f12882b80 test iocp 2021-10-10 23:09:32 +08:00
郑树新
fca21901ac test iocp for fiber module 2021-10-07 23:13:21 +08:00
shuxin   zheng
5c96afd9ce optimize code 2021-09-24 09:10:14 +08:00
shuxin   zheng
d2d376ce73 optimize socketpair 2021-09-24 08:57:02 +08:00
郑树新
cf5bcf5acf optimize socketpair.c 2021-09-23 22:37:56 +08:00
郑树新
cde03a74d4 optimize vs projects 2021-09-16 19:27:09 +08:00
shuxin   zheng
cbdddcca4d optimize fiber for windows platform 2021-09-16 15:17:40 +08:00
郑树新
f3423ef849 optimize fiber module for Windows GUI 2021-09-16 14:57:37 +08:00
郑树新
c0719a1b2e optimize vc projects 2021-09-14 18:34:21 +08:00
郑树新
a8086534c3 optimize and test socketpair for windows 2021-09-09 11:23:05 +08:00
shuxin   zheng
a1d5eb509a optimize socketpair API for windows 2021-09-09 11:07:44 +08:00
郑树新
6279631074 test fiber module on windows 2021-09-08 18:46:38 +08:00
郑树新
8b50e80af3 optimize DNS of fiber for windows 2021-09-08 00:17:57 +08:00
郑树新
e9ea53d74b the thread fiber should be checked when stopping fiber schedule 2021-09-06 22:44:20 +08:00
郑树新
a6f2e61d8c test fiber_tbox for win GUI ok 2021-09-05 23:29:29 +08:00
郑树新
ce60ce7150 fixed bug in acl_atomic.c and atomic.c 2021-08-25 16:28:07 +08:00
郑树新
e0601e582f test some fiber module on windows 2021-08-23 18:41:23 +08:00
郑树新
9d3f6d5cfd test API hook for fiber module on Windows platform. 2021-08-22 23:15:38 +08:00
郑树新
0b96b4f201 test API hook for fiber module on Windows platform. 2021-08-19 22:39:42 +08:00
zhengshuxin
174b1638f6 test fiber module 2021-08-19 22:18:37 +08:00
郑树新
04aaede734 optimize fiber module by hooking system API on windows 2021-08-19 21:45:41 +08:00
zhengshuxin
099b658685 optimizing fiber module 2021-08-18 16:32:34 +08:00
郑树新
2d04980910 optimizing fiber module 2021-08-18 16:07:35 +08:00
shuxin   zheng
1a48b07d9f the even waiting timeout should be restored in acl_fiber_poll/epoll_wait and the 100 ms limit discarded when timeout == 0 2021-06-06 10:05:02 +08:00
zhengshuxin
dbf91ceca8 use -Wanalyzer in gcc to check some warning in acl 2021-02-13 15:15:14 +08:00
zhengshuxin
23b0f0c5af fixed some compiling warning on windows 2021-02-09 15:04:23 +08:00
shuxin   zheng
ce41cda3c0 fixed compiling error for windows 2021-02-03 18:37:16 +08:00
zhengshuxin
b63287774d support read/write timeout by setsockopt in libfiber 2021-01-30 09:11:39 +08:00
zhengshuxin
6b7ae7b883 the socket of one fiber can be closed of another fiber 2021-01-29 13:34:57 +08:00
zhengshuxin
f927b4d736 fiber sem & lock can also be killed by another fiber 2021-01-28 14:58:48 +08:00
zhengshuxin
4b5d501612 one fiber can close the socket of another fiber 2021-01-28 14:03:23 +08:00
zhengshuxin
baaccb37c0 build fiber ok by vc2019 2021-01-11 10:17:50 +08:00
shuxin   zheng
048b0fefcb optimize projects for Android Studio. 2020-12-10 16:57:31 +08:00
shuxin   zheng
29d9902ead build ok by Android Studio with ndk12b 2020-12-10 10:29:29 +08:00
shuxin   zheng
5a4ae5b475 don't use _WINDLL for win32/win64 platform 2020-11-05 16:05:47 +08:00
shuxin   zheng
ea531338d6 format code style 2020-11-05 15:16:35 +08:00
shuxin   zheng
d2ed2e8b29 test building reply package by rfc1035 module 2020-10-24 14:28:15 +08:00
zhengshuxin
c21cc6c733 test dns module 2020-10-24 10:59:00 +08:00
zhengshuxin
ce7c7c093a fixed bug in fiber dns module 2020-10-22 15:02:58 +08:00
zhengshuxin
35804a3bb6 test dns module 2020-10-21 17:19:38 +08:00
shuxin   zheng
7e89735ac1 dns module has been ready! 2020-10-21 15:48:40 +08:00
郑树新
6fae4064d6 build fiber module ok by vc 2020-10-20 21:13:09 +08:00
zhengshuxin
a9b2a20963 rewrite dns module 2020-10-20 18:30:00 +08:00
shuxin   zheng
b86e0e4df7 add lost files 2020-10-20 17:24:18 +08:00
shuxin   zheng
791bbc672a Merge branch 'master' of gitee:zsxxsz/acl into gitee-master 2020-10-20 17:22:52 +08:00
shuxin   zheng
cccec9661c rewriting dns module. 2020-10-20 17:22:07 +08:00
郑树新
3cd10f87a1 build ok by vc 2020-10-19 22:25:35 +08:00
shuxin   zheng
d13dd6586a adding dns module 2020-10-19 18:43:30 +08:00
shuxin   zheng
4f6c47c68a make rfc1035 as a open API of acl 2020-10-19 13:34:18 +08:00
shuxin   zheng
4ee781d55a rewriting dns module 2020-10-18 19:51:05 +08:00
shuxin   zheng
1ce0d2a730 fixed one bug in tcp_nodelay.c 2020-10-16 22:22:41 +08:00
shuxin   zheng
5ca8be3da4 rename dns_init to fiber_dns_init internal 2020-10-09 14:16:46 +08:00
shuxin   zheng
72bb6b909d restore fiber 2020-10-08 17:17:21 +08:00
shuxin   zheng
a1383bf620 test fiber 2020-10-08 15:15:33 +08:00
shuxin   zheng
531d8aeb21 test fiber module on Android. 2020-09-29 19:17:23 +08:00
shuxin   zheng
c414f7afab acl fiber can support Android now. 2020-09-27 23:35:04 +08:00
zhengshuxin
712f2c1781 don't warn when compiling fiber module 2020-09-26 23:45:30 +08:00
shuxin   zheng
17adcd823e add fiber demo for IOS 2020-09-26 23:14:11 +08:00
shuxin   zheng
72ae883ba0 add boost coroutines written by asm. 2020-09-26 22:46:31 +08:00
shuxin   zheng
243748d07b format code 2020-09-07 23:47:00 +08:00
shuxin   zheng
24124b87e7 format code, replace "\n" with "\r\n" for all source files. 2020-08-21 14:55:03 +08:00
zhengshuxin
d800ca468e use MD compiling options for all vc projects 2020-08-06 15:42:37 +08:00
shuxin   zheng
5a1c3b7bf5 There's a better way to check if the given fd is socket, pipe or fifo. 2020-07-12 23:35:39 +08:00
shuxin   zheng
b324fba32f disable USE_FAST_TIME which maybe incorrect in some case. 2020-06-20 14:43:57 +08:00
shuxin   zheng
c4ae1840d7 modify CMakeLists files 2020-06-02 16:51:35 +08:00
zhengshuxin
a0897815e0 merge dns module 2020-05-11 11:29:47 +08:00
郑树新
a02c55173a disable compiling dns module in libfiber for windows. 2020-05-10 20:25:04 +08:00
zhengshuxin
da299c6ae6 fixed compiling warning for dns.c in libfiber.c 2020-05-05 00:20:51 +08:00
zhengshuxin
56d1c7e443 fixed dns module bug of libfiber for gcc9 2020-05-04 23:16:52 +08:00
shuxin   zheng
95883c415f fixed compiling waring on MacOS 2020-02-15 19:26:41 +08:00
shuxin   zheng
f4c063ebc3 test fiber in reactor way 2020-02-09 20:45:17 +08:00
zhengshuxin
dee7833d1d fixed bugs in hook/epoll.c in fiber module for memory overflow 2020-01-25 17:57:00 +08:00
郑树新
fd2038dd58 !3 Compile on raspberry pi 3B,3B+,4B
Merge pull request !3 from wfeii1980/master
2020-01-09 11:02:46 +08:00
zhengshuxin
0a14cdd275 prepare release new version 2020-01-09 10:17:00 +08:00
zhengshuxin
56afc8cf80 compiling acl 2020-01-07 10:36:29 +08:00
wfeii1980
fb928d5103 update lib_fiber/c/src/stdafx.h.
Compile on raspberry pi 3B,3B+,4B
2019-12-09 09:57:25 +08:00
shuxin   zheng
c57e5e5876 compile libfiber for ARM platform 2019-12-03 13:43:53 +08:00
zhengshuxin
bda63febae fatal if fbase->event_in is invalid in fbase_event::fbase_event_open 2019-10-18 10:07:26 +08:00
ruki
1c0ff5d208 update xmake.lua: export public includedirs 2019-10-14 09:34:37 +08:00
zhengshuxin
8d4dff9f18 building with xmake 2019-10-08 16:36:16 +08:00
zhengshuxin
85374450d0 optimize: many optimizing for decrease libs' size for mobile platom;
bugfix: fixed one bug in event_epoll.c of fiber lib.
2019-09-19 10:33:10 +08:00
zhengshuxin
ed1521b36b build ok by xmake 2019-09-03 22:28:50 +08:00
zsxxsz
2ee35f6434 fixed bugs for restarting fiber IO scheduling. 2019-08-17 22:07:51 +08:00
郑树新
f66a47735b fixed compiling error by vc 2019-08-16 18:24:54 +08:00
root
72a5287da5 add memory using debug info. 2019-08-16 18:17:11 +08:00
郑树新
5e8335f011 build ok for windows. 2019-08-15 15:25:28 +08:00
zhengshuxin
946bc1944e use conditional compiling for hooking system API getimeofday 2019-08-12 14:52:09 +08:00
shuxin   zheng
8d96beb9b0 format code 2019-08-11 11:12:39 +08:00
shuxin   zheng
574800f456 event_kqueue.c->kevent_fflush should use hooked API __sys_kevent 2019-08-11 11:10:43 +08:00
zhengshuxin
0c4901f531 fixed one bug in hooked API sleep in io.c 2019-08-08 14:33:32 +08:00
zhengshuxin
a186db64f8 fixed compiling error on maxos 2019-08-07 14:30:12 +08:00
zhengshuxin
e20a39ebef fixed one compiling error on macos 2019-08-07 14:26:24 +08:00
zhengshuxin
42d2bd5684 fixed one bug in hooked API gettimeofday for precision. 2019-08-06 10:28:31 +08:00
zhengshuxin
df843708f8 format code style 2019-07-31 22:06:54 +08:00
zhengshuxin
85812e6f1c improvement ring's performance 2019-07-31 22:00:41 +08:00
zhengshuxin
a0b258eb28 test gettimeofday ok 2019-07-31 16:32:17 +08:00
zhengshuxin
b02dfd34c6 speedup gettimeofday() by using some asm codes from DPDK 2019-07-30 23:48:25 +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
3b1053652f fixed bug in fiber_sem.c 2019-07-17 09:32:20 +08:00
zhengshuxin
123328c1af remove unused comments 2019-06-24 13:06:06 +08:00
zhengshuxin
b71b8840bf replace assert with abort 2019-05-18 22:03:53 +08:00
zhengshuxin
064a4c325c optimize fiber_sem 2019-05-17 11:11:03 +08:00
zhengshuxin
0ffeedfcd4 fixed bugs in fiber_sem.c/fiber_lock.c 2019-05-16 16:48:48 +08:00
郑树新
6e9691397a build ok for vc 2019-01-14 15:33:51 +08:00
zsx
1edd724a8d fixed one bug in fiber for stopping scheduling automatically 2019-01-14 14:34:14 +08:00
zhengshuxin
480a8c9403 optimise fiber 2019-01-02 11:12:55 +08:00
zsx
ac311dd2d1 disable valgrind 2018-12-28 22:22:58 +08:00
zsx
ea8462f1ef add tcp_keeper class for tcp connections keepalive 2018-12-28 21:46:01 +08:00
zsx
fcfaddcf35 add syscall for hook system API 2018-12-27 17:35:18 +08:00
zsx
ff8a217755 acl_fiber_event.c: fixed one bug in event_ferror 2018-12-27 11:06:13 +08:00
zsx
7ab0b6f5e3 fixed bugs in acl_fiber_cond_wait/acl_fiber_cond_timedwait that detaching fbase must before calling acl_fiber_event_wait 2018-12-27 10:07:14 +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
50be7b26a6 fiber_cond.c: fixed one bug in acl_fiber_cond_timedwait when timeout happened 2018-12-24 17:12:10 +08:00
zsx
605adfb614 disable debug fiber with valgrind 2018-12-16 17:46:47 +08:00
zsx
bd6375fe2a connect_manager: support fiber running in threads 2018-12-16 16:47:51 +08:00
zsx
b9ff539209 build fiber for Linux ok 2018-12-14 16:39:13 +08:00
郑树新
fcd083d307 build on Windows ok 2018-12-14 16:34:28 +08:00
zsx
077fcf399f building for all OS 2018-12-07 16:00:59 +08:00
zsx
d0d51ec6d1 build for macos 2018-12-07 13:50:42 +08:00
zsx
4db127ec9f optimize fiber_cond and fiber 2018-11-30 18:26:46 +08:00
zsx
fb271fd104 format to DOS style. 2018-11-30 14:38:22 +08:00
zsx
f570318eb6 modify fiber_cond 2018-11-30 14:36:15 +08:00
zsx
8ed462ce69 replace assert with msg_fatal 2018-11-30 11:45:58 +08:00
zsx
56c8a058f4 fiber_event.c: fixed one bug in acl_fiber_event_notify 2018-11-29 22:44:16 +08:00
zsx
e48753986e fbase_event.c: restart IO when IO process is interrupted by EINTR. 2018-11-29 11:28:48 +08:00
zsx
2033c94414 add fiber_cond.c 2018-11-28 15:51:33 +08:00
zsx
9cd475d83f add fiber_cond.c 2018-11-28 15:51:22 +08:00
zsx
9b26998122 add fbase_event.c 2018-11-28 13:42:10 +08:00
zsx
ec495072b1 lib_fiber/c/src/fiber_event.c: fixed one bug for lock conlision 2018-11-28 09:47:04 +08:00
zsx
92ffb2cc9d fixed one bug in fiber_event.c 2018-11-27 14:51:11 +08:00
zsx
feb5b87f59 add_write should return 0 or -1 2018-11-26 13:04:27 +08:00
zsx
8064aaab35 fixed one bug in iocp_check of file event_iocp.c 2018-11-26 09:22:55 +08:00
zhengshuxin
f7af753d9e add one flag when creating fiber_event 2018-11-24 11:49:18 +08:00
zsxxsz
96fd5bf486 build ok for windows 2018-10-31 22:14:09 +08:00
zhengshuxin
fb376b2484 compatiable for lower cmake 2018-10-27 22:21:29 +08:00
zsx
ae8b5cf026 fxied one bug in getaddrinfo.c of lib_fiber 2018-09-20 09:56:15 +08:00
zsx
35229c19b6 fixed one bug in getaddrinfo.c 2018-09-19 19:18:01 +08:00
郑树新
e6cead0a67 fixed one problem in getaddrinfo of lib_fiber; 2018-09-19 18:36:05 +08:00
zsx
808023c5a2 change charset from utf-8 to gbk for some files merged. 2018-08-24 17:49:13 +08:00
郑树新
6772f92d9b !1 修复在 FreeBSD 8.x 上编译的一个错误
Merge pull request !1 from lsgx/fix-freebsd8-error
2018-08-24 17:40:43 +08:00
zsx
46f12d39ca using libfiber.h for C and libfiber.hpp for C++ 2018-08-19 23:03:39 +08:00
zsx
e4a342b5f4 merge from libfiber 2018-08-19 22:47:26 +08:00
zhengshuxin
e5b554930b some samples of fiber should be compiled by c++11 compiler. 2018-08-10 21:02:14 +08:00
zhengshuxin
820a5c0b61 building 2018-08-08 16:50:43 +08:00
zhengshuxin
ae7ce4ee23 compilie dns.c module of lib_fiber on low version gcc 2018-08-08 16:34:28 +08:00
zsx
e8fad9062a fixed some compiling warning 2018-08-08 11:45:37 +08:00
Charlie Root
82708780d8 fixed one compiling error for freebsd8 by jjx 2018-07-01 22:09:12 +08:00
zsx
ac7a0d4c5b fixed bugs in acl_write_wait.c: when POLLHUP and POLLERR returned, don't return -1 2018-05-17 16:45:15 +08:00
zsx
57d48b9870 fiber module can be built by xcode;
add diff module into acl_cpp xcode project;
2018-04-25 11:58:53 +08:00
zsx
d64d78eb16 libfiber can be used on MacOS 2018-04-24 14:29:35 +08:00
zsx
4c1e1ae197 comile lib_fiber for MacOSX 2018-04-22 23:46:17 +08:00
zhengshuxin
7647c210b7 acl build without ACL_PREPARE_COMPILE defined 2018-04-17 16:42:26 +08:00
zsx
618592e086 all the fibers memory in dead fibers or aliving status should be freed when acl_fiber_stop been called 2018-04-17 11:33:20 +08:00
zsx
5090a5cdca gethostbyname should be fiber safety 2018-03-05 13:41:18 +08:00
郑树新
02ba7723e0 build ok on vc2013 2018-03-05 11:50:22 +08:00
zsx
63f9ac04f8 merge from libfiber 2018-03-05 11:05:05 +08:00
zsxxsz
89b15923d6 add lost header 2018-02-10 15:09:25 +08:00
zsxxsz
06409bdae4 add winsock lib in event_iocp.c 2018-02-09 23:28:40 +08:00
zsx
4a7a8f830e no debug 2018-02-07 19:19:31 +08:00
zhengshuxin
9ee53a8a5a fiber on FreeBSD with kqueue is OK! 2017-09-23 08:47:25 +08:00
zhengshuxin
4614c7e118 fiber event: fixed possible bug in events 2017-09-22 22:11:51 +08:00
zhengshuxin
7670fca314 compiling for FreeBSD ok 2017-09-22 19:22:26 +08:00
zsx
3c46adddb3 fiber_server: support setting schedule event type in configure. 2018-02-05 10:16:52 +08:00
zsxxsz
a0160d2ea1 fixed some compiling error on vc2012/2013. 2018-02-03 22:35:58 +08:00
zsxxsz
6d9add27bd bugfix in lib_acl: POLLHUP | POLLERR should not be set as input parameters. 2018-02-03 21:27:21 +08:00
郑树新
342f42c38a fiber: support winsock IOCP event. 2018-02-01 18:40:31 +08:00
郑树新
a16c4122d0 fiber: adding iocp event 2018-01-31 19:16:23 +08:00
郑树新
2af5a9307f fiber: adding iocp event 2018-01-31 19:01:04 +08:00
郑树新
2e5a3ab9fd fiber: adding iocp event 2018-01-31 11:55:16 +08:00
zsxxsz
580fdc4f72 fiber event: adding iocp for winsock 2018-01-30 23:45:34 +08:00
郑树新
fa7a71f2fb fiber: add iocp event 2018-01-30 19:57:51 +08:00
郑树新
08f229f494 fiber: add iocp event for windows 2018-01-30 19:57:30 +08:00
zsx
7329f830e9 server_socket supports SO_REUSEPORT on Linux3.x 2018-01-29 23:33:49 +08:00
zsxxsz
2e38ce1365 fiber schedule process can be triggered automaticly. 2018-01-28 12:34:23 +08:00
zsx
3e998cb37a compiline error 2018-01-23 19:51:42 +08:00
zsx
21119f88a0 master_guard: add all info for version 2018-01-23 19:48:45 +08:00
zsx
d384dce04e master_guard: add all info for version 2018-01-23 19:46:45 +08:00
zsxxsz
5fcd7a20c3 select/WSAPoll of Windows disable non SOCKETS been set. 2018-01-22 23:45:00 +08:00
zsxxsz
66c05c16cb fiber for windows: client2 and server2 run very well:) 2018-01-22 22:01:12 +08:00
郑树新
49a92e9348 fiber io can also stop automaticly when no IO and no timers been set. 2018-01-22 18:38:50 +08:00
zsx
12fe61726a fiber_io.c: IO fiber can exit automatically when no FD and no timer. 2018-01-22 17:31:00 +08:00
zsxxsz
588c871124 fiber client2 sample can run on Windows. 2018-01-21 15:41:19 +08:00
zsxxsz
de8be9ca0f fiber's event_poll.c can handle POLLERR | POLLHUP | POLLNVAL 2018-01-21 11:40:34 +08:00
zsxxsz
400904dccf add error handling in acl_vstream.c & poll.c when operation timeout;
in fiber_win.c when calling CreateFiberEx, using size as the parameter
dwStackReserveSize;
2018-01-20 21:57:39 +08:00
zsx
310d353114 remove valgrind debug by default in Makefile of fiber 2018-01-19 10:42:22 +08:00
zsxxsz
fe2ff8adb5 when new fiber can't be created on win32, just call msg_fatal 2018-01-18 23:10:34 +08:00
zsx
5391987156 fixed channel.cpp in fiber compiling error 2018-01-18 14:37:06 +08:00
zsx
602128784f fiber sample: add http_request sample 2018-01-17 15:55:10 +08:00
郑树新
d819724c3b fiber performance: improve the messages handling performance in Windows 2018-01-17 14:10:19 +08:00