How to use the select26.EPOLLHUP function in select26

To help you get started, we’ve selected a few select26 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github realXtend / tundra / src / Application / PythonScriptModule / pymodules_old / circuits / net / pollers.py View on Github external
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

select26

Backport of the new select module with epoll and kqueue interface

MIT
Latest version published 17 years ago

Package Health Score

39 / 100
Full package analysis

Similar packages