C/C++ server and network library, including coroutine,redis client,http/https/websocket,mqtt, mysql/postgresql/sqlite client with C/C++ for Linux, Android, iOS, MacOS, Windows, Harmony,etc..
Acl -- Advanced Cross-Platform C/C++ Network Communication Library and Server Framework
0. About Acl Project
Acl (Advanced C/C++ Library) is a powerful cross-platform network communication library and server programming framework that supports Linux, Windows, Solaris, FreeBSD, macOS, Android, iOS, and HarmonyOS. Numerous applications developed with Acl run on various devices, providing stable and reliable services to hundreds of millions of users.
The Acl project includes a rich set of functional modules: network communication, server framework, application protocols, various codecs, and more. It has built-in implementations of common network protocols such as HTTP/SMTP/ICMP/MQTT/Redis/Memcached/Beanstalk/Handler Socket, as well as complete codec libraries including XML/JSON/MIME/BASE64/UUCODE/QPCODE/RFC2047/RFC1035, etc. Additionally, Acl provides a unified abstract interface for mainstream databases (MySQL, PostgreSQL, SQLite), enabling developers to write database applications more easily, quickly, and securely.
Software Architecture

1. Six Core Modules
As a fully-featured C/C++ foundation library, Acl provides rich and practical functionality for application development. The six core modules include: Network Communication, Coroutine, HTTP, Redis Client, MQTT, and Server Framework.
1.1. Basic Network Module
Stream Processing Module
This module is the cornerstone of Acl's network communication, providing a unified streaming communication interface that supports both network streams and file streams. Main features include:
- Read data line by line, automatically compatible with
\r\non Windows and\non UNIX - Read data line by line with automatic removal of trailing newline characters (
\nor\r\n) - Read data with custom string delimiters
- Read data of specified length
- Try to read a line or specified length of data
- Detect network IO status
- Write a line of data
- Formatted data writing (similar to
fprintf) - File stream positioning operations (similar to
fseek) - Batch write data (similar to UNIX
writev) - Truncate files (similar to
ftruncate) - Get file size and current file stream pointer position (similar to
ftell) - Get local and remote addresses of network streams
Network Operation Module
This module provides complete network operation functionality, including:
- Network server listening (supports TCP/UDP/UNIX domain sockets)
- Network client connection (supports TCP/UNIX domain sockets)
- DNS domain name query and result caching (supports both system API calls and direct DNS protocol)
- Socket operations and local network interface information retrieval
Non-blocking Network Stream
Comprehensive support for non-blocking network operations, including non-blocking connections, reads (line reads, specified length reads), writes (line writes, specified length writes, batch writes), etc.
Common Network Application Protocol Library
Built-in implementations of common network application protocols such as HTTP, SMTP, ICMP, etc. The HTTP and ICMP modules support both blocking and non-blocking communication modes. The HTTP protocol in the C++ version of lib_acl_cpp provides both server and client modes:
- Server Mode: Provides a Java HttpServlet-like interface, supports Cookie, Session, HTTP MIME file upload, etc.
- Client Mode: Supports connection pool and cluster management, chunked transfer, automatic character set conversion, automatic decompression, resume download, and other rich features
Common Network Communication Library
Provides client communication libraries for Memcached, Beanstalk, Handler Socket, etc., all supporting connection pool mode.
1.2. Coroutine
Acl's coroutine module is a mature and stable cross-platform coroutine library that has been widely used and validated in many important projects.
Platform Support
- Supports mainstream operating systems including Linux, macOS, Windows, iOS, and Android
- Supports multiple CPU architectures including x86, ARM, etc.
- Supports multiple event engines including select/poll/epoll/kqueue/iocp/win32 GUI messages
Core Features
- Complete DNS Protocol Implementation: DNS protocol is natively implemented in coroutines, DNS API can be used directly in coroutines
- System API Hook: Automatically hooks system IO APIs on Unix and Windows platforms to enable coroutine support
- Read APIs: read/readv/recv/recvfrom/recvmsg
- Write APIs: write/writev/send/sendto/sendmsg/sendfile64
- Socket APIs: socket/listen/accept/connect/setsockopt
- Event APIs: select/poll/epoll_create/epoll_ctl/epoll_wait
- DNS APIs: gethostbyname/gethostbyname_r/getaddrinfo/freeaddrinfo
- Shared Stack Mode: Supports shared stack mode to significantly reduce memory usage
Synchronization Primitives
- Coroutine Mutex and Semaphore: For synchronization between coroutines
- Coroutine Event: Supports synchronous communication between coroutines and threads
For more details, see Using Acl Coroutine Library
1.3. HTTP Module
Complete implementation of HTTP/1.1 protocol, supporting both client and server application development.
Main Features
- Java HttpServlet-like Interface (server side): Provides familiar programming interface, reducing learning curve
- Connection Pool Mode (client side): Efficiently manages connection resources, improves performance
- Chunked Transfer: Supports streaming data transfer
- Compression: Built-in Gzip compression/decompression support
- SSL/TLS Encryption: Supports secure encrypted transmission
- Resume Download: Supports resume download for large files
- Cookie Management: Complete cookie setting and retrieval functionality
- Session Management (server side): Built-in session management mechanism
- WebSocket Support: Supports WebSocket protocol
- HTTP MIME Format: Supports MIME multipart data format
- Sync/Async Mode: Flexible choice of communication modes
1.4. Redis Client
Acl's Redis client module is powerful, high-performance, and easy to use, making it an ideal choice for production environments.
Features
- Rich Command Support: Supports Redis data types and commands including Bitmap/String/Hash/List/Set/Sorted Set/PubSub/HyperLogLog/Geo/Script/Stream/Server/Cluster
- STL-style Interface: Provides STL-like C++ interface for each Redis command, conforming to C++ programming conventions
- Smart Cluster Management: Client automatically caches and adapts to changes in Redis cluster hash slots without manual intervention
- Multiple Communication Modes: Supports standalone, cluster, and pipeline modes with unified interface
- Connection Pool Support: Built-in connection pool supporting standalone and cluster modes, improving resource utilization
- High Performance: Excellent performance in cluster and pipeline modes
- Automatic Retry: Automatically retries on network errors, improving reliability
- Coroutine Friendly: Can be used in shared stack coroutine mode
For more details, see Using Acl Redis Client
1.5. MQTT Module
Acl fully implements the MQTT 3.1.1 protocol with a streaming parser design that can flexibly adapt to various IO modes.
Core Features
- Complete MQTT 3.1.1 Protocol Support: Implements all standard commands
- CONNECT/CONNACK/PUBLISH/PUBACK/PUBREC/PUBREL/PUBCOMP
- SUBSCRIBE/SUBACK/UNSUBSCRIBE/UNSUBACK
- PINGREQ/PINGRESP/DISCONNECT
- Object-Oriented Design: Each MQTT command corresponds to an independent class with clear structure
- Streaming Parser: Independent of IO mode, can be combined with any network communication method
- Separation of Parsing and Communication: Data parsing is completely decoupled from network communication, providing high flexibility
- Dual-End Support: Can be used for both client and server development
For more details, see Using Acl MQTT
1.6. Server Framework
The server framework is the core module in Acl, helping developers quickly build high-performance backend services (such as web services). Through the code generation tool in app/wizard, a complete service code framework can be generated in seconds.
Architecture Design
The Acl server framework consists of two parts:
- Service Manager (acl_master): Derived from the famous Postfix MTA's master process, extensively extended to become a general-purpose service manager
- Service Templates: Provides multiple service templates for developers to choose from
Six Service Templates
Process Service Model
One connection per process.- Advantages: Simple programming, safe and stable
- Disadvantages: Limited concurrency
- Use Cases: High security requirements, low concurrency scenarios
Thread Service Model
Each process handles all client connections through a thread pool, using IO event triggering mechanism.- Advantages: Handle many connections with few threads, relatively simple programming
- Features: Threads are bound only when connections have data, released immediately after processing
- Use Cases: High concurrency scenarios, easier to develop than AIO model
AIO Service Model (Non-blocking)
Similar to Nginx/Squid/IRCd, single thread handles many connections in non-blocking IO mode.- Advantages: High processing efficiency, low resource consumption
- Disadvantages: Higher programming complexity
- Use Cases: Ultra-high concurrency, extreme performance requirements
Coroutine Service Model
Combines the high concurrency capability of non-blocking model with the simplicity of synchronous programming.- Advantages: High concurrency + low programming complexity, sequential IO programming style
- Features: Automatically converts blocking operations to non-blocking processes, improving concurrency
- Use Cases: Preferred choice for high concurrency scenarios, balancing performance and development efficiency
UDP Service Model
Service model specifically for UDP communication.- Use Cases: Applications requiring UDP protocol
Trigger Service Model
For handling scheduled tasks in background services (similar to system crontab).- Use Cases: Scheduled tasks, background scheduling
2. Other Important Modules
2.1. MIME Module
MIME (Multipurpose Internet Mail Extensions) is an important data format standard widely used in email and web applications.
Features
- Complete implementation of MIME-related RFC standards: RFC2045/RFC2047/RFC822
- Provides streaming MIME data parser independent of IO model
- Can be flexibly used in synchronous or asynchronous IO programs
- Supports MIME data parsing and construction
2.2. Codec Module
Acl provides rich codecs, all using streaming parsing design, independent of the IO communication layer.
Supported Codec Formats
- JSON: Streaming JSON parser and builder, supports serialization/deserialization between JSON data and C structures, greatly improving development efficiency
- XML: Streaming XML parser and builder
- Base64: Base64 encoding/decoding
- URL: URL encoding/decoding
- Others: UUCODE, QPCODE, RFC2047, etc.
2.3. Database Module
Acl provides a unified database abstraction interface to simplify database application development.
Core Features
- Unified Interface: Provides unified operation interface for MySQL, PostgreSQL, SQLite
- SQL Security: Built-in SQL codec automatically escapes special characters, effectively preventing SQL injection attacks
- Dynamic Loading: Uses dynamic library loading, no need to worry about dependencies when not using database functionality
- Connection Pool Support: Built-in database connection pool management
2.4. Connection Pool Manager
Acl provides a general connection pool manager widely used in various client communication modules of the Acl library.
Application Scenarios
- Redis client connection pool
- Database connection pool
- HTTP client connection pool
- Other network client connection pools
2.5. Other Client Libraries
In addition to the Redis client, Acl implements various commonly used client communication libraries.
Supported Clients
- Memcached: Supports connection pool
- Handler Socket: Client for MySQL's Handler Socket plugin
- Beanstalk: Message queue client
- Disque: Distributed message queue client
2.6. DNS Module
Acl provides a complete DNS solution that can use system APIs or directly implement DNS protocol.
Features
- System API Wrapper: Wraps system APIs such as
getaddrinfoandgethostbyname - Protocol Implementation: Complete implementation of DNS protocol specified in RFC1035
- Dual-End Support: Can be used to implement DNS client or DNS server
- Result Caching: Supports DNS query result caching to improve performance
3. Platform Support and Compilation
3.1. Compiling Acl on Different Platforms
Acl is a cross-platform library supporting mainstream operating systems and multiple compilation toolchains.
Supported Platforms
- Linux, Windows, macOS, FreeBSD, Solaris
- Android, iOS, Harmony
Compilation Methods
Linux/UNIX Platform
Compiler: gcc/clang
Make Method:
cd acl/ makeAfter compilation, the following will be generated in the
acl/directory:libacl_all.a(static library, containing lib_acl.a, lib_protocol.a, and libacl_cpp.a)libacl_all.so(dynamic library)
CMake Method:
./cmake-build.shXMake Method:
xmake
Windows Platform
- Supports Visual Studio 2003/2008/2010/2012/2013/2015/2019 and other versions
- For VS6/VS2005, refer to VS2003 compilation configuration
macOS/iOS Platform
- Compile using Xcode
Android Platform
- Open the
acl/android/acl_ndk20b/project with Android Studio
Harmony Platform
- Open the
acl/harmony/api13/project with DevEco Studio
Cross-Platform Compilation
- Supports cross-platform compilation using CMake
3.2. Notes on Windows Compilation
When using Acl dynamic libraries in Windows environment, you need to add corresponding predefined macros in your project.
Predefined Macro Description
| Library Used | Required Predefined Macro | Description |
|---|---|---|
| lib_acl dynamic library | ACL_DLL |
Base library |
| lib_protocol HTTP library | HTTP_DLL |
HTTP protocol library |
| lib_protocol ICMP library | ICMP_DLL |
ICMP protocol library |
| lib_acl_cpp dynamic library | ACL_CPP_DLL |
C++ library |
Detailed Instructions
- For detailed compilation process and configuration methods, see: Acl Library Compilation and Usage
4. Quick Start
4.1. First Acl Example
This is the simplest Acl program, demonstrating how to use Acl's string class.
#include <iostream>
#include "acl_cpp/lib_acl.hpp"
int main() {
acl::string buf = "hello world!\r\n";
std::cout << buf.c_str() << std::endl;
return 0;
}
4.2. Simple TCP Server
This example shows how to create a simple TCP echo server using Acl, handling client connections with multiple threads.
#include <thread>
#include "acl_cpp/lib_acl.hpp"
void run() {
const char* addr = "127.0.0.1:8088";
acl::server_socket server;
if (!server.open(addr)) { // Bind and listen on local address.
return;
}
while (true) {
acl::socket_stream* conn = server.accept(); // Wait for connection.
if (conn == NULL) {
break;
}
std::thread thread([=] { // Start a thread to handle the connection.
char buf[256];
int ret = conn->read(buf, sizeof(buf), false); // Read data.
if (ret > 0) {
conn->write(buf, ret); // Write received data.
}
delete conn;
});
thread.detach();
}
}
4.3. Simple TCP Client
This example shows how to create a TCP client using Acl, connecting to a server and sending/receiving data.
#include "acl_cpp/lib_acl.hpp"
void run() {
const char* addr = "127.0.0.1:8088";
int conn_timeout = 5, rw_timeout = 10;
acl::socket_stream conn;
if (!conn.open(addr, conn_timeout, rw_timeout)) { // Connect to server.
return;
}
const char data[] = "Hello world!\r\n";
if (conn.write(data, sizeof(data) - 1) == -1) { // Send data to server.
return;
}
char buf[256];
int ret = conn.read(buf, sizeof(buf) - 1, false);
if (ret > 0) { // Read from server.
buf[ret] = 0;
std::cout << buf << std::endl;
}
}
4.4. Coroutine TCP Server
This example shows how to create a high-concurrency TCP server using Acl coroutines, implementing asynchronous processing with sequential programming style.
#include "acl_cpp/lib_acl.hpp"
#include "fiber/go_fiber.hpp"
void run() {
const char* addr = "127.0.0.1:8088";
acl::server_socket server;
if (!server.open(addr)) {
return;
}
go[&] { // Create a server coroutine to wait for connections.
while (true) {
acl::shared_stream conn = server.shared_accept();
if (conn == nullptr) {
break;
}
go[conn] { // Create a client coroutine to handle the connection.
while (true) {
char buf[256];
int ret = conn->read(buf, sizeof(buf), false);
if (ret <= 0 || conn->write(buf, ret) != ret) {
break;
}
}
};
}
};
acl::fiber::schedule(); // Start the coroutine scheduling process.
}
4.5. HTTP Client Example
This example shows how to create an HTTP client using Acl, sending HTTP requests and getting responses.
#include "acl_cpp/lib_acl.hpp"
bool run() {
acl::http_request conn("www.baidu.com:80");
acl::http_header& header = conn.request_header()
header.set_url("/")
.set_keep_alive(false);
.set_content_type("text/html");
if (!conn.request(NULL, 0)) {
return false;
}
int status = conn.http_status();
if (status != 200) {
return false;
}
long long len = conn.body_length();
if (len <= 0) {
return true;
}
acl::string buf;
if (!conn.get_body(body)) {
return false;
}
return true;
}
4.6. Coroutine HTTP Server
This example shows how to create a fully-featured HTTP server using Acl coroutines, supporting routing, configuration management, and other features.
#include "acl_cpp/lib_acl.hpp" // Must be before http_server.hpp
#include "fiber/http_server.hpp"
static char *var_cfg_debug_msg;
static acl::master_str_tbl var_conf_str_tab[] = {
{ "debug_msg", "test_msg", &var_cfg_debug_msg },
{ 0, 0, 0 }
};
static int var_cfg_io_timeout;
static acl::master_int_tbl var_conf_int_tab[] = {
{ "io_timeout", 120, &var_cfg_io_timeout, 0, 0 },
{ 0, 0 , 0 , 0, 0 }
};
int main(int argc, char* argv[]) {
const char* addr = "0.0.0.0|8194";
const char* conf = argc >= 2 ? argv[1] : NULL;
acl::http_server server;
// Call methods in acl::master_base class.
server.set_cfg_int(var_conf_int_tab).set_cfg_str(var_conf_str_tab);
// Call methods in acl::http_server.
server.on_proc_init([&addr] {
printf("---> after process init: addr=%s, io_timeout=%d\r\n", addr, var_cfg_io_timeout);
}).on_proc_exit([] {
printf("---> before process exit\r\n");
}).on_proc_sighup([] (acl::string& s) {
s = "+ok";
printf("---> process got sighup\r\n");
return true;
}).on_thread_accept([] (acl::socket_stream& conn) {
printf("---> accept %d\r\n", conn.sock_handle());
return true;
}).Get("/", [](acl::HttpRequest&, acl::HttpResponse& res) {
std::string buf("hello world1!\r\n");
res.setContentLength(buf.size());
return res.write(buf.c_str(), buf.size());
}).Post("/json", [](acl::HttpRequest& req, acl::HttpResponse& res) {
acl::json* json = req.getJson();
if (json) {
return res.write(*json);
} else {
std::string buf = "no json got\r\n";
res.setContentLength(buf.size());
return res.write(buf.c_str(), buf.size());
}
}).run_alone(addr, conf);
return 0;
}
4.7. Redis Client Example
This example shows how to use the Acl Redis client for multi-threaded operations, including connection pool management and basic Redis commands.
#include <thread>
#include "acl_cpp/lib_acl.hpp"
static void thread_run(acl::redis_client_cluster& conns) {
acl::redis cmd(&conns);
std::map<acl::string, acl::string> attrs;
attrs["name1"] = "value1";
attrs["name2"] = "value2";
attrs["name3"] = "value3";
acl::string key = "hash-key-1";
if (!cmd.hmset(key, attrs)) {
printf("hmset error=%s\r\n", cmd.result_error());
return;
}
attrs.clear();
if (!cmd.hgetall(key, attrs)) {
printf("hgetall error=%s\r\n", cmd.result_error());
}
}
void run() {
const char* addr = "126.0.0.1:6379";
acl::redis_client_cluster conns;
conns.set(addr, 0);
const size_t nthreads = 10;
std::thread threads[nthreads];
// Create some threads to test redis using the same conns.
for (size_t i = 0; i < nthreads; i++) {
threads[i] = std::thread(thread_run, std::ref(conns));
}
// Wait for all threads to exit
for (size_t i = 0; i < nthreads; i++) {
threads[i].join();
}
}
5. More Information
5.1. Sample Code
The Acl library provides a large number of sample codes for learning and reference, covering the usage of various functional modules.
Sample Index: SAMPLES.md
5.2. More Simple Examples
To help developers get started quickly, we provide many simple and easy-to-understand small examples.
Sample Repository: Acl Demos
5.3. FAQ
Encountering problems when using Acl? Check the frequently asked questions.
FAQ Document: FAQ.md
5.4. Open Source License
Acl adopts the LGPL-v2.1 open source license and can be freely used in commercial and non-commercial projects.
License Details: LICENSE.txt
5.5. Related Links
Official Resources
- ๐ Official Website: https://acl-dev.cn/
- ๐ป GitHub: https://github.com/acl-dev/acl
- ๐จ๐ณ Gitee: https://gitee.com/acl-dev/acl
- ๐ Technical Blog: https://blog.csdn.net/zsxxsz
- ๐ฆ Weibo: http://weibo.com/zsxxsz
Community
- ๐ฌ QQ Group: 705290654
5.6. Acknowledgments
Thanks to
for supporting the Acl project.
6. Appendix
6.1. Software Layered Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Application Layer โ
โ Business code, HTTP server, WebSocket service, etc. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ High-level API Layer โ
โ โโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโ โ
โ โ HTTP โ Redis โ MQTT โ DB โ โ
โ โ Module โ Module โ Module โ Module โ โ
โ โโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโ โ
โ โโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโ โ
โ โ Master โ Fiber โ ConnPool โ Stream โ โ
โ โFramework โCoroutine โ Pool โProcessingโ โ
โ โโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Core Library Layer โ
โ - Network I/O (socket, stream, aio) โ
โ - Event-driven (event, epoll, kqueue, iocp) โ
โ - Memory management (memory pool, dbuf) โ
โ - Data structures (string, array, hash, list) โ
โ - Utilities (log, config, thread, process) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Operating System Layer โ
โ Linux / FreeBSD / macOS / Windows / Android / iOS / Harmony โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
6.2. Project Directory Structure
acl/
โโโ lib_acl/ # Core C library (base library)
โ โโโ include/ # Public header files
โ โโโ src/ # Source code implementation
โ โ โโโ stdlib/ # Standard library (string, memory, file, etc.)
โ โ โ โโโ common/ # Common data structures (hash, list, queue, tree, etc.)
โ โ โ โโโ memory/ # Memory management (memory pool, slab, dbuf)
โ โ โ โโโ string/ # String operations
โ โ โ โโโ filedir/ # File and directory operations
โ โ โ โโโ configure/ # Configuration file parsing
โ โ โ โโโ iostuff/ # IO utility functions
โ โ โ โโโ debug/ # Debugging tools
โ โ โ โโโ sys/ # System-related wrappers
โ โ โโโ net/ # Network module
โ โ โ โโโ connect/ # Client connection
โ โ โ โโโ listen/ # Server listening
โ โ โ โโโ dns/ # DNS resolution
โ โ โโโ event/ # Event engine (epoll/kqueue/iocp/select/poll)
โ โ โโโ aio/ # Asynchronous IO module
โ โ โโโ thread/ # Thread and thread pool
โ โ โโโ master/ # Server framework (process management)
โ โ โ โโโ template/ # Service templates (process/thread/aio/coroutine/UDP/trigger)
โ โ โโโ db/ # Database module
โ โ โ โโโ mysql/ # MySQL support
โ โ โ โโโ memdb/ # In-memory database
โ โ โ โโโ zdb/ # ZDB storage engine
โ โ โโโ json/ # JSON parser
โ โ โโโ xml/ # XML parser
โ โ โโโ code/ # Encoding/decoding (base64/url/html, etc.)
โ โ โโโ msg/ # Message queue
โ โ โโโ init/ # Initialization module
โ โ โโโ ioctl/ # IO control
โ โ โโโ proctl/ # Process control (Windows)
โ โ โโโ unit_test/ # Unit testing framework
โ โโโ samples/ # Extensive sample code
โ
โโโ lib_protocol/ # Protocol library (C implementation)
โ โโโ include/ # Protocol header files
โ โโโ src/ # Protocol implementation
โ โ โโโ http/ # HTTP protocol
โ โ โโโ icmp/ # ICMP/Ping protocol
โ โ โโโ smtp/ # SMTP mail protocol
โ โโโ samples/ # Protocol samples
โ
โโโ lib_acl_cpp/ # C++ wrapper library (advanced features)
โ โโโ include/ # C++ header files
โ โ โโโ acl_cpp/ # Main header directory
โ โ โ โโโ stdlib/ # Standard library wrapper
โ โ โ โโโ stream/ # Stream processing
โ โ โ โโโ http/ # HTTP client and server
โ โ โ โโโ redis/ # Redis client
โ โ โ โโโ mqtt/ # MQTT protocol
โ โ โ โโโ db/ # Database wrapper
โ โ โ โโโ mime/ # MIME protocol
โ โ โ โโโ master/ # Master framework wrapper
โ โ โ โโโ connpool/ # Connection pool
โ โ โ โโโ session/ # Session management
โ โ โ โโโ memcache/ # Memcached client
โ โ โ โโโ beanstalk/ # Beanstalk client
โ โ โ โโโ disque/ # Disque client
โ โ โ โโโ hsocket/ # Handler Socket client
โ โ โ โโโ ipc/ # Inter-process communication
โ โ โ โโโ queue/ # File queue
โ โ โ โโโ serialize/ # Serialization (JSON/Gson)
โ โ โ โโโ aliyun/ # Aliyun SDK (OSS, to be implemented)
โ โ โ โโโ event/ # Event wrapper
โ โโโ src/ # C++ source implementation
โ โ โโโ stdlib/ # Standard library implementation (string/logger/charset/zlib, etc.)
โ โ โโโ stream/ # Stream implementation (socket/ssl/aio)
โ โ โโโ http/ # HTTP implementation
โ โ โ โโโ h2/ # HTTP/2 support (to be implemented)
โ โ โ โโโ h3/ # HTTP/3 support (to be implemented)
โ โ โโโ redis/ # Redis client implementation
โ โ โโโ mqtt/ # MQTT protocol implementation
โ โ โโโ db/ # Database implementation
โ โ โโโ mime/ # MIME implementation
โ โ โโโ master/ # Master framework implementation
โ โ โโโ connpool/ # Connection pool implementation
โ โ โโโ session/ # Session implementation
โ โ โโโ memcache/ # Memcached implementation
โ โ โโโ beanstalk/ # Beanstalk implementation
โ โ โโโ disque/ # Disque implementation
โ โ โโโ hsocket/ # Handler Socket implementation
โ โ โโโ ipc/ # IPC implementation
โ โ โโโ queue/ # Queue implementation
โ โ โโโ serialize/ # Serialization implementation
โ โ โโโ smtp/ # SMTP implementation
โ โ โโโ aliyun/ # Aliyun OSS client implementation(to be implemented)
โ โ โโโ net/ # Network utilities (DNS)
โ โโโ samples/ # Rich sample code
โ โโโ http/ # HTTP samples
โ โโโ redis/ # Redis samples
โ โโโ mqtt/ # MQTT samples
โ โโโ db/ # Database samples
โ โโโ master/ # Master framework samples
โ โโโ fiber/ # Coroutine samples
โ โโโ ... # More samples
โ
โโโ lib_fiber/ # Coroutine library (core features)
โ โโโ c/ # C language implementation
โ โ โโโ include/ # Coroutine header files
โ โ โโโ src/ # Coroutine source code
โ โ โโโ common/ # Common modules
โ โ โโโ fiber/ # Coroutine core
โ โ โโโ event/ # Event engine
โ โ โโโ sync/ # Synchronization primitives (mutex/sem/event)
โ โ โโโ hook/ # System API Hook
โ โ โโโ ...
โ โโโ cpp/ # C++ wrapper
โ โ โโโ include/ # C++ header files
โ โ โโโ src/ # C++ implementation
โ โโโ samples-c/ # C language samples
โ โโโ samples-c++/ # C++ samples
โ โโโ samples-c++1x/ # C++11/14/17 samples
โ โโโ samples-gui/ # GUI samples (Windows)
โ โโโ unit_test/ # Unit tests
โ
โโโ lib_dict/ # Dictionary library (optional)
โ โโโ bdb/ # Berkeley DB support
โ โโโ cdb/ # CDB support
โ โโโ tc/ # Tokyo Cabinet support
โ
โโโ lib_tls/ # TLS/SSL library (optional)
โ โโโ src/ # TLS implementation
โ
โโโ lib_rpc/ # RPC library (experimental)
โ โโโ src/ # RPC implementation
โ
โโโ app/ # Applications and tools
โ โโโ wizard/ # Code generation wizard (important tool)
โ โ โโโ tmpl/ # Service templates (process/thread/aio/coroutine/UDP/trigger)
โ โโโ wizard_demo/ # Sample projects generated by wizard
โ โโโ master/ # Master service manager
โ โ โโโ daemon/ # Daemon process
โ โ โโโ tools/ # Management tools
โ โ โโโ ...
โ โโโ jaws/ # Web application server
โ โโโ redis_tools/ # Redis toolset
โ โโโ net_tools/ # Network tools
โ โโโ gson/ # JSON serialization tool
โ โโโ jencode/ # Encoding conversion tool
โ โโโ iconv/ # Character set conversion
โ โโโ ...
โ
โโโ doc/ # Documentation directory
โ โโโ README.md # Documentation index
โ โโโ fiber/ # Coroutine documentation
โ โโโ http/ # HTTP documentation
โ โโโ redis/ # Redis documentation
โ โโโ mqtt/ # MQTT documentation
โ โโโ db/ # Database documentation
โ โโโ master/ # Master framework documentation
โ โโโ stream/ # Stream documentation
โ โโโ mime/ # MIME documentation
โ โโโ connpool/ # Connection pool documentation
โ โโโ rfc/ # RFC documentation
โ โโโ ...
โ
โโโ include/ # Third-party library header files
โ โโโ mysql/ # MySQL header files
โ โโโ pgsql/ # PostgreSQL header files
โ โโโ sqlite/ # SQLite header files
โ โโโ openssl-1.1.1q/ # OpenSSL header files
โ โโโ mbedtls/ # MbedTLS header files
โ โโโ polarssl/ # PolarSSL header files
โ โโโ zlib-1.2.11/ # Zlib header files
โ โโโ ...
โ
โโโ lib/ # Pre-compiled library files (by platform)
โ โโโ linux64/ # Linux 64-bit
โ โโโ linux32/ # Linux 32-bit
โ โโโ win32/ # Windows 32-bit
โ โโโ win64/ # Windows 64-bit
โ โโโ macos/ # macOS
โ โโโ freebsd/ # FreeBSD
โ โโโ solaris/ # Solaris
โ
โโโ android/ # Android platform support
โ โโโ acl_ndk20b/ # NDK r20b project
โ โโโ acl_ndk28c/ # NDK r28c project
โ โโโ samples/ # Android samples
โ
โโโ harmony/ # Harmony platform support
โ โโโ api9/ # HarmonyOS API 9
โ โโโ api12/ # HarmonyOS API 12
โ โโโ api13/ # HarmonyOS API 13
โ โโโ api16/ # HarmonyOS API 16
โ
โโโ xcode/ # Xcode project (macOS/iOS)
โ โโโ ... # Xcode project files
โ
โโโ dist/ # Installation directory (after make install)
โ โโโ include/ # Installed header files
โ โโโ lib/ # Installed library files
โ โโโ master/ # Master configuration and scripts
โ
โโโ unit_test/ # Unit tests
โ โโโ ... # Test cases
โ
โโโ packaging/ # Packaging configuration
โ โโโ ... # RPM/DEB packaging scripts
โ
โโโ CMakeLists.txt # CMake build configuration
โโโ Makefile # Main Makefile
โโโ xmake.lua # XMake build configuration
โโโ README.md # English documentation
โโโ README_CN.md # Chinese documentation
โโโ SAMPLES.md # Sample code index
โโโ FAQ.md # Frequently asked questions
โโโ BUILD.md # Build instructions
โโโ LICENSE.txt # Open source license
โโโ changes.txt # Change log