A Brief History of quicX

It has been many years since the first line of quicX code was written — so many that some modules have been rewritten several times over, and the original ideas have long since blurred.

Around 2017, I wrote cppnet, a TCP networking library. Those were the months when I was at my most naive and most enthusiastic about networking: following classic books and mature open-source libraries, I pieced together epoll, threading models, and buffer management one by one — one loop per thread, memory pools, thundering-herd handling. Every problem I figured out felt like another step deeper into networking. It took about half a year to finish the library. It ran, it worked, and its performance was decent — it felt like a genuine accomplishment. Yet looking back many years later, everything I was so proud of then was just stacking toy blocks on TCP’s shoulders. Reliability was a gift from the kernel: loss recovery, congestion control, flow control, in-order delivery — all quietly taken care of somewhere out of sight. Behind every send and recv I called lay an entire reliable machinery that had been running for decades. To learn that machinery, I read plenty of classic networking books and believed I had it all figured out.

So I rolled up my sleeves and set out to write a reliable UDP transport library — that is how the hudp repository came to be. The initial idea was somewhat naive: TCP’s reliability is nothing more than retransmission and timeouts; port those two onto UDP, and wouldn’t that be a reliable transport of my own? I would even shake off TCP’s historical baggage and travel light. But when testing packet transmission, the results kept disappointing: sometimes fast, sometimes slow, collapsing whenever loss piled up — and next to TCP, the gap was embarrassing. At first I assumed something was miswritten; after going through the code back and forth several times, I realized the code wasn’t wrong — I had oversimplified reliability. Packets get lost, reordered, and duplicated. Round-trip time has to be measured, retransmission timeouts estimated, sending rate restrained, congestion avoided on the public Internet, bandwidth probed. Just articulating the principle of each mechanism takes considerable effort, let alone implementing every one of them, correctly, in code.

It was while hunting for material that I stumbled upon QUIC. The moment I opened the RFC, my eyes lit up: someone had already charted these waters. QUIC moves everything TCP does in the kernel into user space, rebuilds reliability on top of UDP, and along the way fixes TCP’s old ailments — head-of-line blocking, slow handshakes, connection migration. The more I read, the more I felt that this was exactly what I wanted. So I dove in headfirst. That was the beginning of quicX — and back then I had no idea how much time this choice would cost.

Before starting, I did weigh QUIC’s complexity; having written two networking libraries, I figured I wasn’t walking in blind. But once I actually began, the difference in difficulty turned out to be an order of magnitude. What needed implementing was far more than a single protocol — it was an entire protocol family: beyond the transport layer itself, TLS 1.3 had to be woven into the handshake, HTTP/3 and QPACK layered on top, and the encryption key hierarchy kept evolving across connection stages. Every layer had its own state machine, and the whole stack worked like a precisely meshed gearbox, in which no gear could be a hair out of place. In the early days, material was scarce — a few RFCs were all there was to read; there were several industrial-grade implementations, but they were hard to decipher. And harder than unreadable code was debugging: doing bit-level packet transmission and serialization over UDP, a hair’s-breadth miss leads a mile astray — one misaligned bit, one botched memory copy, and the transmission is doomed. And when the protocol fails, there is no error, no stack trace — only endless breakpoint analysis and packet captures, staring at the details of the data stream. I have lost count of how many times I got stuck over those years. I only remember many nights staring at packet captures until late, the screen dense with hexadecimal, the characters starting to swim after looking too long. It was anything but easy.

Enthusiasm, as it turns out, does not survive long attrition. A problem stuck for a few weeks, other matters of life creeping in, and progress gets shelved. But however busy the day, in the deep of night I still couldn’t help wondering why. Finished things stay quiet; unfinished things keep making noise. Every so often I would come back, and the places that had me stuck — I would somehow, luckily, find the answers. So: push forward a while, get stuck, shelve it, come back again. That is how quicX inched forward, bit by bit.

In the pre-AI era, a baffling problem truly left you stumped — many of them sat right at the edge of what I knew. Books don’t answer questions; search engines merely rearrange the same explanations; and there was no one around to talk it through with. Stuck was stuck. AI filled exactly this gap. Before, a single blocker meant endlessly adding logs myself, capturing packets for evidence, and comparing back and forth against other implementations. With AI, I could hand off all that legwork and keep only the decisions and design disagreements for discussion. As the project iterated, AI grew ever more capable, and we grew ever more fluent working together. In the last two years, quicX has moved faster and faster — leaps and bounds is no exaggeration. I have since written plenty of essays on AI coding — on methodology, on engineering discipline — but as far as first-hand experience goes, quicX was the first project that made me feel my individual productivity being amplified to such a degree.

And so, patch by patch, the project finally came together into a modest success. To verify its quality, I put quicX through QUIC interoperability testing, side by side with mainstream implementations such as lsquic, s2n-quic, neqo, and Chrome: compliance on protocol features passed at over ninety percent, and scenarios like handshake, HTTP/3 transactions, and single-stream throughput earned full marks. There are shortcomings, of course — pass rates for connection migration and port rebinding are still not ideal, and work continues. Such results are hardly dazzling; behind those industrial implementations stand full-fledged teams, while quicX, on and off over many years, was written almost entirely by one person. But for a personal project, being able to interoperate with the most mainstream QUIC implementations means it has finally earned a respectable place among them.

As for the technical side — why QUIC is needed, and what problems implementing a QUIC/HTTP3 library involves — I wrote a long piece on exactly that; if you are interested, feel free to take a look. From bottom-layer socket send/receive to top-layer HTTP semantics, the entire chain was written line by line by myself, and only after writing it did I truly understand: reading a protocol and turning an RFC into running code are two completely different things. Reading about sliding windows ten thousand times is worth less than deciding, once and on your own, when to send a window update.

In the past couple of years, the winds of AI have blown ever stronger — infra, agents, skills, a flood of concepts and projects from every direction; a framework today, a paradigm tomorrow, everyone chasing the wave. Writing a C++ transport protocol library at such a moment seems almost quaintly retro. Yet the very technical trend that helped me finish quicX is precisely what makes low-level protocols look outdated. That dissonance leaves me momentarily dizzy. In any case, quicX has finally reached a releasable milestone. The code is right here: https://github.com/caozhiyi/quicX.

This year marks my tenth as a programmer. If a craftsman ought to have a masterpiece, quicX is the work I am proudest of so far. As for how technology will evolve in the AI era, and what these pre-AI technical assets will ultimately be worth, time will give the answer. I will keep polishing the details — as a quiet answer to all those nights I stayed up thinking too hard to sleep.