SpiecsEngine
 
Loading...
Searching...
No Matches

◆ Update()

void Spices::Net::EPollPoller::Update ( int operation,
Channel * channel ) const
private

Update epoll with operation.

Parameters
[in]operation.
[in]channelChannel.

Definition at line 111 of file EPollPoller.cpp.

112 {
113 epoll_event event = {};
114
115 SOCKET fd = channel->Fd();
116
117 event.events = channel->Events();
118 event.data.sock = fd;
119 event.data.ptr = channel;
120
121 if(::epoll_ctl(m_EPollFd, operation, fd, &event))
122 {
123 if(operation == EPOLL_CTL_DEL)
124 {
125 std::stringstream ss;
126 ss << "EPollPoller::Update::EPOLL_CTL_DEL Error: " << WSAGetLastError();
127
128 SPICES_CORE_ERROR(ss.str())
129 }
130 else
131 {
132 std::stringstream ss;
133 ss << "EPollPoller::Update::EPOLL_CTL_ADD/MOD Error: " << WSAGetLastError();
134
135 SPICES_CORE_CRITICAL(ss.str())
136 }
137 }
138 }
HANDLE m_EPollFd
EPoll fd.
Definition EPollPoller.h:96