boolean write = (ev & Native.EPOLLOUT) != 0;
boolean close = (ev & Native.EPOLLRDHUP) != 0;
AbstractEpollChannel ch = ids.get(id);
if (ch != null) {
AbstractEpollUnsafe unsafe = (AbstractEpollUnsafe) ch.unsafe();
if (write && ch.isOpen()) {
// force flush of data as the epoll is writable again
unsafe.epollOutReady();
}
if (read && ch.isOpen()) {
// Something is ready to read, so consume it now
unsafe.epollInReady();
}
if (close && ch.isOpen()) {
unsafe.epollRdHupReady();
}
}
}
}
}