Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
HAS_EPOLL = 2
except ImportError:
try:
from select26 import epoll
from select26 import EPOLLIN, EPOLLOUT, EPOLLHUP, EPOLLERR
HAS_EPOLL = 1
except ImportError:
HAS_EPOLL = 0
from circuits.core import handler, Event, BaseComponent
if HAS_POLL:
_POLL_DISCONNECTED = (POLLHUP | POLLERR | POLLNVAL)
if HAS_EPOLL:
_EPOLL_DISCONNECTED = (EPOLLHUP | EPOLLERR)
TIMEOUT = 0.2
###
### Events
###
class Read(Event): pass
class Write(Event): pass
class Error(Event): pass
class Disconnect(Event): pass
class _Poller(BaseComponent):
channel = None