爱意满满的作品展示区。
yinqiwen

C++20(coroutine) 写了个 proxy 工具

  •  
  •   yinqiwen ·
    yinqiwen · Jul 7, 2022 · 2520 views
    This topic created in 1417 days ago, the information mentioned may be changed or developed.

    https://github.com/yinqiwen/snova-asio

    特色在于:

    • 低资源占用
    • 正反向 proxy
    6 replies    2022-07-11 11:45:14 +08:00
    archxm
        1
    archxm  
       Jul 9, 2022
    请问怎么不影响旧程序,而升级 gcc ,我们目前用的 4.4.7 版本。
    yinqiwen
        2
    yinqiwen  
    OP
       Jul 9, 2022
    linux 上用的是编译时指定下载 musl 工具链( https://more.musl.cc/11/x86_64-linux-musl/),可以随时升级, 而不是系统自带的 gcc ;
    nmap
        3
    nmap  
       Jul 11, 2022
    这个 coroutine 需要各种第三方网络库支持吗?
    yinqiwen
        4
    yinqiwen  
    OP
       Jul 11, 2022
    @nmap coroutine 和网络库没啥直接关系,只是一种运行机制;理论上你可以把任何异步调用封装成 coroutine 调用, 这方面可以参考 folly 的实现: https://github.com/facebook/folly/tree/main/folly/experimental/coro
    nmap
        5
    nmap  
       Jul 11, 2022
    @yinqiwen #4 比如说,libcurl 只支持阻塞调用实现 http client get ,能通过 coroutine 来异步调用它吗?
    yinqiwen
        6
    yinqiwen  
    OP
       Jul 11, 2022
    @nmap 阻塞同步调用不行, 只能是非阻塞异步的;
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   881 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 22:22 · PVG 06:22 · LAX 15:22 · JFK 18:22
    ♥ Do have faith in what you're doing.