Giter Site home page Giter Site logo

server-iouring's Introduction

依赖

  1. -std=c++20
  2. liburing:io_uring作者的liburing
  3. fmt:gcc13才有std::format

测试

测试机:

aliyun

测试结果:

result

阿里云

链接==>🔗(不一定开着)

参考资料

c++ 协程

图最好背下来 要明白任务类似这种:

  1. accept listen_fd get client_fd
  2. read client_fd
  3. process
  4. wirte client_fd
  5. 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()
}
  1. 知乎:C++20协程不完全指南
  2. cpp reference:link
  3. 知乎:如何编写 C++ 20 协程(Coroutines)
  4. CSDN用户RzBu11d023r:有点东西,虽然有点乱

io_uring

  1. 知乎:一篇文章带你读懂 io_uring 的接口与实现
  2. c语言,包含cat、cp程序,小型webserver:lord of the io_uring
  3. bound workers和unbound workers:wokers
  4. liburing issues
  5. man liburing接口

server-iouring's People

Contributors

llz-lian avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.