當前位置:學者齋 >

有關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