liuguangxuan
V2EX  ›  C++

不懂就要问,请教各位大佬,如何从 0 学习 libevent?

  •  
  •   liuguangxuan · Mar 12, 2020 · 3531 views
    This topic created in 2276 days ago, the information mentioned may be changed or developed.

    之前一直在 Windows 下开发,用一个线程一个socket的做法,现在想学习libevent,打算在CentOS下做实验。

    从网上搜索资料看了一天,reactor之类的,有点儿懵。请教各位大佬,有没有比较好的教程、书籍资料推荐。

    8 replies    2020-03-13 09:15:49 +08:00
    nightwitch
        1
    nightwitch  
       Mar 12, 2020
    如果连 reactor/proactor 都不了解的话,你要学的不是 libevent,是《 Unix 网络编程》。看完这本书再回去看 libevent,自然懂了
    nybux
        2
    nybux  
       Mar 12, 2020
    推荐 libuv,感觉性能好一点,nodejs 的基础库
    ghonfir
        3
    ghonfir  
       Mar 12, 2020
    先学习网络模型,不要一开始就用网络库
    paoqi2048
        4
    paoqi2048  
       Mar 13, 2020
    先把 UNP 给看了
    felix021
        5
    felix021  
       Mar 13, 2020   ❤️ 1
    正好以前写过,供参考吧
    https://www.felix021.com/blog/read.php?2068
    liuguangxuan
        6
    liuguangxuan  
    OP
       Mar 13, 2020
    @nightwitch 多谢指教。
    liuguangxuan
        7
    liuguangxuan  
    OP
       Mar 13, 2020
    @nybux
    @sryanyuan
    @paoqi2048
    多谢指教。
    liuguangxuan
        8
    liuguangxuan  
    OP
       Mar 13, 2020
    @felix021 我从网上也搜到了这篇教程,原来是您写的。感谢感谢。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3201 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 03:03 · PVG 11:03 · LAX 20:03 · JFK 23:03
    ♥ Do have faith in what you're doing.