def unregister(self, filleno): sock = self.clients.get(filleno) if sock: try: self.epoll.unregister(filleno) sock.close() except: trace() del self.clients[filleno]
def modify(self, sock, type): try: self.epoll.modify(sock.fileno(), type) except: trace()