Chinaunix

标题: 求助关于epoll里的eventmask [打印本页]

作者: gamegjx    时间: 2013-06-19 16:42
标题: 求助关于epoll里的eventmask
当epoll里侦听的event事件时候
当event等于1时,就是代表select.EPOLLIN
当event等于4时,就是代表select.EPOLLOUT

但是当客户端断开时,然后我调用socket.send后
event就等于25了
再之后
event就等于24了

请问一下
当event等于24、以及25的时候,分别代表什么意思呢?
作者: timespace    时间: 2013-06-19 18:00
从文档里猜测吧
  1. Python 2.6.6 (r266:84292, Feb 21 2013, 23:54:59)
  2. [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
  3. Type "help", "copyright", "credits" or "license" for more information.
  4. >>> import select
  5. >>> help(select)

  6. DATA
  7.     EPOLLERR = 8
  8.     EPOLLET = -2147483648
  9.     EPOLLHUP = 16
  10.     EPOLLIN = 1
  11.     EPOLLMSG = 1024
  12.     EPOLLONESHOT = 1073741824
  13.     EPOLLOUT = 4
  14.     EPOLLPRI = 2
  15.     EPOLLRDBAND = 128
  16.     EPOLLRDNORM = 64
  17.     EPOLLWRBAND = 512
  18.     EPOLLWRNORM = 256
复制代码





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2