Learn how Linux epoll works by building a real event-driven TCP server from scratch across 16 published days.
Use the completed code as a reference implementation of the Reactor pattern in modern C++.
Follow the day-by-day progression to understand why high-performance servers use non-blocking I/O instead of one thread per connection.
Requires Linux with g++ and make, each day builds independently with a single make command inside the day folder.
This is a 30-day self-paced tutorial for building a network server in C++ on Linux, written in Chinese. Each day covers a focused topic and produces working code that you can compile and run, so you can see your progress at the end of every session rather than waiting until the end of the course. The tutorial is aimed at people who already know C or C++ basics and want to understand how high-performance server software actually works at the system level. The author's argument is that using higher-level languages or frameworks can teach you to build servers, but not why they perform the way they do. Understanding low-level concepts like TCP connections, sockets, memory buffers, and Linux-specific I/O mechanisms requires working in C or C++. The 16 published days cover building a basic socket server, proper error handling, using epoll (a Linux mechanism for monitoring many network connections efficiently), organizing the code into classes, adding an event-driven core, accepting connections, managing TCP connections as objects, adding read and write buffers, integrating a thread pool for handling work in parallel, restructuring the server into a multi-threaded Reactor pattern, and refactoring to use smart pointers. Each day links to a tutorial document in the repository, and the source code for each day is organized into folders. Running make inside a day's folder produces a server binary and a client binary, so you can test the interaction between the two. The tutorial is unfinished, and the author has noted that a separate project by another contributor continues where this one left off.
← yuesong-feng on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.