- -std=c++20
- liburing:io_uring作者的liburing
- fmt:gcc13才有std::format
链接==>🔗(不一定开着)
图最好背下来 要明白任务类似这种:
- accept listen_fd get client_fd
- read client_fd
- process
- wirte client_fd
- continue read?goto read or return
Task Work()
{
http_request = new http_request;
int client_fd = co_awiat Accept(listen_fd);// handle need new work
// client_fd = await_resume(); cqe->res;
while(true)
{
int read_num = co_awiat Read(client_fd,read_buffer);
int keep_read = process(http_request);
co_await Write(client_fd, write_buffer);
if(!keep_read) break;
}
delete request;
close()
}
- 知乎:C++20协程不完全指南
- cpp reference:link
- 知乎:如何编写 C++ 20 协程(Coroutines)
- CSDN用户RzBu11d023r:有点东西,虽然有点乱
- 知乎:一篇文章带你读懂 io_uring 的接口与实现
- c语言,包含cat、cp程序,小型webserver:lord of the io_uring
- bound workers和unbound workers:wokers
- liburing issues
- man liburing接口