Ejemplo n.º 1
0
int BaseHandleThread::init() {
    int listener = createListener(m_host, m_port, m_backlog);
    if (listener < 0) {
        return -1;
    }
    m_listener = listener;

    int notifyFd = createNotifyFd();
    if (notifyFd < 0) {
        return -2;
    }
    m_notifyFd = notifyFd;

    m_epollFd = createEpoll();

    return 0;
}
Ejemplo n.º 2
0
EventDispatcherEPollPrivate::EventDispatcherEPollPrivate(EventDispatcherEPoll* const q)
    : q_ptr(q)
{
    createEpoll();
}