SpiecsEngine
 
Loading...
Searching...
No Matches

◆ RemoveChannel()

void Spices::Net::EPollPoller::RemoveChannel ( Channel * channel)
overridevirtual

Remove Channel and Update Poll.

Parameters
[in]channelChannel.

Implements Spices::Net::Poller.

Definition at line 88 of file EPollPoller.cpp.

89 {
90 SOCKET fd = channel->Fd();
91 m_Channels.erase(fd);
92
93 const auto state = channel->GetPollState();
94 if (state == Channel::PollState::Added)
95 {
96 Update(EPOLL_CTL_DEL, channel);
97 }
98 channel->SetPollState(Channel::PollState::New);
99 }
void Update(int operation, Channel *channel) const
Update epoll with operation.
ChannelMap m_Channels
This Poller interested Channels.
Definition Poller.h:94

References Spices::Net::Channel::Added, Spices::Net::Channel::GetPollState(), Spices::Net::Channel::New, and Spices::Net::Channel::SetPollState().