当前位置:学者斋 >

有关epoll的大全

使用python实现Linux异步epoll的代码
  • 使用python实现Linux异步epoll的代码

  • 代码如下:importsocketimportselectif__name__=="__main__":s=et(_INET,_STREAM)ockopt(_SOCKET,_REUSEADDR,1)(("",20123))en(10)epoll=l()printno()printLIN|LETster(no(),LIN|LET)while1:epoll_list=()forfd,eventsinepoll_list:printfdprinteventsiffd==no():conn,ad...
  • 30861