STTNet

Lightweight High-Performance C++ Network Framework

STTNet is a lightweight, high-performance server framework built around the Reactor event-driven concurrency model, implemented in modern C++17. It is designed for scalable, non-blocking network programming and efficient handling of massive concurrent connections.

At its core, STTNet is based on epoll-driven event loops and follows a classic one-loop-per-thread Reactor architecture. By decoupling I/O multiplexing, event dispatching, and business logic, the framework achieves low latency, high throughput, and predictable performance under heavy load.

On top of the Reactor core, STTNet provides unified support for TCP, UDP, HTTP, and WebSocket protocols, as well as TLS/HTTPS/WSS encrypted communication. It integrates multithreaded event loops, asynchronous task dispatching via worker thread pools, and a flexible callback-based programming model.

In addition, STTNet includes commonly required server-side components such as asynchronous file I/O, logging facilities, JSON processing, signal and exception handling, and basic cryptographic and security utilities.

STTNet 是一个基于 Reactor 事件驱动并发模型 的轻量级高性能服务器框架, 使用现代 C++17 编写,面向可扩展的非阻塞网络编程场景, 能够高效支撑大规模并发连接。

在架构层面,STTNet 以内核级 epoll 为基础,采用经典的 one-loop-per-thread Reactor 设计, 将 I/O 多路复用、事件分发与业务逻辑清晰解耦, 从而在高并发负载下保持低延迟、高吞吐和稳定的性能表现。

在 Reactor 核心之上,STTNet 统一支持 TCP、UDP、HTTP、WebSocket 等协议, 并提供 TLS/HTTPS/WSS 加密通信能力。 框架内置多线程事件循环机制与工作线程池, 支持异步任务投递,采用灵活的回调模型以简化复杂并发逻辑的表达。

同时,STTNet 还集成了服务端开发中常见的基础组件, 包括异步文件 I/O、日志系统、JSON 处理、 信号与异常管理,以及基础的加解密与安全工具。

📘 中文文档 📙 English Docs 🌐 GitHub

📬 联系作者

如果你在使用 STTNet 时遇到问题,或想提出建议,可以通过以下方式联系我:

📧 1356597983@qq.com