前言: 首先,这篇博客写给自己看的,方便自己回顾一下,复习项目过程中的知识点,加深自己的记忆。 参考了这篇文章:从零开始实现C++ TinyWebServer 全过程记录_tinywebserver要做多久-CSDN博客 --------------------------------------------------------------------------------------------------------------------------------- 实现流程: 1.框架: 网络框架的设计离不开 I/O 线程模型,线程模型的优劣直接决定了系统的吞吐量、可扩展性、安全性等。目前主流的网络框架几乎都采用了 I/O 多路复用的方案。Reactor 模式作为其中的事件分发器,负责将读写事件分发给对应的读写事件处理者。 本次项目使用的就是单reactor多线程模式,在主线程中通过epoll来实现 I/O多路复用监听多个文件描述符上的事件,在线程池中通过添加任务从而达到让子线程来处理读写事件,...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with Bool IsKeepAlive
Contact Bool IsKeepAlive, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack