2
3
4
5
25 if (m_Tie.has_value())
27 if (m_Tie.value().lock())
56 if ((m_Revents & EPOLLHUP) && !(m_Revents & EPOLLIN))
65 if (m_Revents & EPOLLERR)
74 if (m_Revents & (EPOLLIN | EPOLLPRI))
83 if (m_Revents & EPOLLOUT)
void Update()
Update this Channel state to Poller.
EventLoop * m_Loop
This channel interested EventLoop.
Channel(SOCKET fd, EventLoop *loop)
Constructor Function.
void HandleEvent() const
Handle happened events on fd.
void HandleEventsWithGuard() const
Internal handle happened events on fd.
void Tie(const std::shared_ptr< void > &obj)
int m_Revents
Current happened event type.
EventFlags m_Events
This SOCKET interested Events type.
void Remove()
Remove this Channel state from Poller.
PollState m_PollState
This channel PollState.
Wrapper of SOCKET'S Event.
void UpdateChannel(Channel *channel) const
Update channel state with poller.
void RemoveChannel(Channel *channel) const
Remove channel from poller.
Wrapper of Poller and wakeup socket to acceptor(SubLoop).