How to use the select26.EPOLLIN 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
def _updateRegistration(self, fd):
        try:
            fileno = fd.fileno()
            self._poller.unregister(fileno)
        except (SocketError, IOError), e:
            if e[0] == EBADF:
                keys = [k for k, v in self._map.items() if v == fd]
                for key in keys:
                    del self._map[key]

        mask = 0

        if fd in self._read:
            mask = mask | EPOLLIN
        if fd in self._write:
            mask = mask | EPOLLOUT

        if mask:
            self._poller.register(fd, mask)
            self._map[fileno] = fd
        else:
            super(EPoll, self).discard(fd)

select26

Backport of the new select module with epoll and kqueue interface

MIT
Latest version published 17 years ago

Package Health Score

42 / 100
Full package analysis

Similar packages