1. lua-epollLua的epoll模塊

        聯(lián)合創(chuàng)作 · 2023-09-29 12:50

        Lua的epoll模塊

        更多細節(jié),請查看sample.lua

        API:

        ok,err=epoll.setnonblocking(fd)

        設置一個文件描述符非阻塞。

        epfd,err=epoll.create()

        創(chuàng)建一個 epoll 文件描述符。

        ok,err=epoll.register(epfd,fd,eventmask)

        把目標文件描述符 fd 注冊到由 epfd 引用的 epoll 實例上并把相應的事件 event 與內(nèi)部的 fd 相鏈接。

        ok,err=epoll.modify(epfd,fd,eventmask)

        更改目標文件描述符 fd 相關聯(lián)的事件 event。

        ok,err=epoll.unregister(epfd,fd)

        從由 epfd 引用的 epoll 實例中刪除目標文件描述符 fd。

        events,err=epoll.wait(epfd,timeout,max_events)

        在一個 epoll 文件描述符上等待 I/O 事件。

        ok,err=epoll.close(epfd)

        關閉一個 epoll 文件描述符。

        瀏覽 26
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        評論
        圖片
        表情
        推薦
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
          
          

            1. 亚洲天堂男人在线 | 欧美逼逼操 | 中国成人黄色网址 | 天天操视频网站 | 一级AAAA片 |