Commit Graph

372 Commits

Author SHA1 Message Date
涵曦
2d42adb739 fix typo: remove duplicate include (#1570) 2022-04-10 15:35:46 +08:00
Bruce
9fd7a51b34 Compat lua compile as cpp (#1568)
* Compat lua compile as cpp

* Compat lua compile as cpp
2022-04-07 17:22:32 +08:00
Cloud Wu
d1ce950dc1 Fix #1552 2022-03-19 07:10:52 +08:00
Cloud Wu
b13281b77d bugfix : See #1535 2022-02-14 07:52:46 +08:00
Cloud Wu
9cbab6f5ec avoid warnings 2021-09-27 08:52:23 +08:00
Cloud Wu
edbed9f980 bugfix: Don't need inc sending since dw_buffer is not NULL 2021-09-26 11:57:32 +08:00
colin
338f53fbe0 use _mm_pause (#1433) 2021-07-01 19:29:48 +08:00
colin
5c154d34dc improve spinlock (#1431)
* improve spinlock

* improve spinlock

* typo

Co-authored-by: colin <linzhengqun@163.com>
2021-06-30 12:42:58 +08:00
喜欢兰花山丘
f5eee7dcbb Update socket_server.c (#1410)
1. 去除冗余代码
2. fix 保存第一现场的错误码
2021-05-30 06:52:02 +08:00
busymage
2b71c2755a Fix boostrap only support 1 param. (#1377) 2021-04-07 19:08:29 +08:00
Cloud Wu
df2803469e Add report_error(), this may fix issue #1376 2021-04-07 07:26:02 +00:00
Cloud Wu
e69f876867 raise error on start, fix #1374 2021-04-07 03:39:22 +00:00
Cloud Wu
85dde52107 minor bugfix : socket_server_poll never returns -1 2021-04-06 16:45:51 +08:00
Cloud Wu
8ad6622936 halfclose_read should call before force_close 2021-04-06 15:47:32 +08:00
Cloud Wu
ba26c8a432 Do not close on error, see #1373 2021-04-06 10:46:41 +08:00
云风
9228b05dfe socket.onclose() (#1364)
* Add socket.onclose() and close socket immediately when socket channel closed by peer

* Revert read_socket(), Add SOCKET_MORE, See #1358

* remove warning log , because it's not a rare case any more. See #1358
2021-03-19 18:52:09 +08:00
Cloud Wu
600a64327e fix halfclose bug, See detail #1358 2021-03-09 17:45:03 +08:00
Cloud Wu
0d9bfcb721 Atomic variable should be volatile, #1356 #1317 2021-03-09 10:54:49 +08:00
Cloud Wu
8d895ab2f0 See #1317 2021-03-05 21:36:52 +08:00
Cloud Wu
c12a7d1b99 Remove unused include 2021-03-04 11:40:15 +08:00
Cloud Wu
77c965e9e8 Don't support old MacOSX 2021-03-03 17:08:12 +08:00
Cloud Wu
0d949678b9 shutdown write when write error, See #1346 2021-03-01 11:18:56 +08:00
Cloud Wu
29a212db8e Shutdown SHUT_RD after read 0, See #1346 for detail 2021-02-25 22:36:36 +08:00
Cloud Wu
ccac1d4526 fix #1348 2021-02-25 19:59:12 +08:00
Cloud Wu
4bb883b989 report write error 2021-02-24 17:02:23 +08:00
Cloud Wu
6a8ca29d99 set result for SOCKET_CLOSE, see #1347 2021-02-24 11:54:47 +08:00
Cloud Wu
6a4a2482fc expand buffer faster 2021-02-24 11:33:35 +08:00
Cloud Wu
04dd921c5f Fix socket half close issues, see #1346 for details 2021-02-24 10:57:54 +08:00
Cloud Wu
51a942d095 bugfix: disable fd reading flag after shutdown read 2021-02-22 09:41:59 +08:00
云风
1a0461a9af Halfclose (#1338)
* post SOCKET_CLOSE when HALFCLOSE_READ, see #1331

* Add closing status

* Add closing stat in info, See #1333
2021-02-03 16:49:40 +08:00
子熏
2e06706323 fix atomic of macosx (#1320) See #1317
Co-authored-by: zixun <lvzxiun@gmail.com>
2021-01-11 17:41:03 +08:00
Cloud Wu
bc2fba560f CAS expected should not be _Atomic type, #1317 2021-01-11 17:10:26 +08:00
Cloud Wu
1ed4fdf94d Use _Atomic type for socket.sending and socket.udpconnecting. See #1317 2021-01-11 16:57:25 +08:00
云风
b164e3a8a9 use stdatomic (#1317) 2021-01-11 10:54:34 +08:00
子熏
56c70dc7ac fix socket half close (#1263)
Co-authored-by: zixun <lvzxiun@gmail.com>
2020-12-03 15:47:51 +08:00
Cloud Wu
6c3e969e91 shutdown read while halfclose 2020-10-19 11:05:08 +08:00
Cloud Wu
1dfddc0d84 add reading and writing into netstat 2020-10-16 13:06:01 +08:00
Cloud Wu
e241920949 enable read when closing 2020-10-15 17:34:44 +08:00
Cloud Wu
0971ce9912 enable write in socket thread 2020-10-13 14:21:38 +08:00
Cloud Wu
77311c7243 enable error handle 2020-10-13 12:04:08 +08:00
Cloud Wu
e75d033066 fix kqueue 2020-10-13 10:53:33 +08:00
Cloud Wu
a4221deac1 enable read 2020-10-12 22:34:46 +08:00
Cloud Wu
f3acbe46df bugfix: pause will disable write event 2020-10-12 18:28:24 +08:00
Dirk Chang
55efa75fdf Invalid addrinfo pointer casues skynet asserted in freeaddrinfo on OpenWRT (arm cpu) (#1236) 2020-08-31 16:48:50 +08:00
Cloud Wu
51fd63213e bugfix: switch reading status 2020-08-10 16:35:55 +08:00
Cloud Wu
a4dc6b9094 add api skynet_socket_pause 2020-08-10 10:57:59 +08:00
fanlix
f2b1bd7319 stat: add mem stat for jemalloc (#1218)
1, add opts arg for mallctl,dumpinfo
2, collect jemalloc.mem info
3, add debug_console cmd: jmem

Co-authored-by: fx <fx@f.x>
2020-07-22 19:26:39 +08:00
zixun
b7b595e53a fix kqueue read with eof 2019-11-28 10:20:00 +08:00
Cloud Wu
80d1082b42 bugfix 2019-11-14 10:49:25 +08:00
Cloud Wu
9d7ea09789 Add socket_sendbuffer 2019-11-14 10:49:25 +08:00