Merge branch 'gitee-master' into gitlab-upstream

This commit is contained in:
zhengshuxin 2023-12-07 19:24:03 +08:00
commit 15fb868797
7 changed files with 1852 additions and 27 deletions

View File

@ -214,7 +214,7 @@ void run(void) {
while (true) {
acl::socket_stream* conn = server.accept(); // Wait for connection.
if (conn == NULl) {
if (conn == NULL) {
break;
}
std::thread thread([=] { // Start one thread to handle the connection.

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,7 @@ project = 'acldocs'
copyright = 'Copyright 2023 The Acl Authors.'
author = 'zsxxsz'
#html_logo = 'image/ea_big.png'
html_logo = 'image/acl_big.png'
exclude_patterns = []
highlight_language = 'c++'

BIN
docs/source/image/acl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

View File

@ -1,8 +1,8 @@
Elastic AI
==========
.. image:: image/ea_big.png
:alt: EA
.. image:: image/acl_big.png
:alt: Acl
Elastic AI abbreviated as EA, In future documents, we will all call it EA.

View File

@ -142,20 +142,20 @@ void event_fire(ACL_EVENT *ev)
if (r_timeout > 0 && r_callback) {
fdp->r_ttl = ev->present + fdp->r_timeout;
fdp->r_callback(ACL_EVENT_RW_TIMEOUT, ev,
r_callback(ACL_EVENT_RW_TIMEOUT, ev,
fdp->stream, fdp->r_context);
}
/* ready[i] maybe been set NULL in r_callback */
if (w_timeout > 0 && w_callback && ready[i]) {
fdp->w_ttl = ev->present + fdp->w_timeout;
fdp->w_callback(ACL_EVENT_RW_TIMEOUT, ev,
w_callback(ACL_EVENT_RW_TIMEOUT, ev,
fdp->stream, fdp->w_context);
}
continue;
}
if ((type & (ACL_EVENT_READ | ACL_EVENT_ACCEPT))) {
if ((type & (ACL_EVENT_READ | ACL_EVENT_ACCEPT)) && fdp->r_callback) {
fdp->event_type &= ~(ACL_EVENT_READ | ACL_EVENT_ACCEPT);
if (fdp->r_timeout > 0)
fdp->r_ttl = ev->present + fdp->r_timeout;
@ -178,7 +178,7 @@ void event_fire(ACL_EVENT *ev)
if (ready[i] == NULL)
continue;
if ((type & (ACL_EVENT_WRITE | ACL_EVENT_CONNECT))) {
if ((type & (ACL_EVENT_WRITE | ACL_EVENT_CONNECT)) && fdp->w_callback) {
if (fdp->w_timeout > 0)
fdp->w_ttl = ev->present + fdp->w_timeout;
fdp->event_type &= ~(ACL_EVENT_WRITE | ACL_EVENT_CONNECT);