MCPcopy Create free account
hub / github.com/SFML/SFML / clear

Method clear

src/SFML/Network/SocketSelector.cpp:183–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181 }
182
183 void clear()
184 {
185 for (const auto& entry : sockets)
186 {
187 // Since epoll automatically removes registered fds when we close them treat ENOENT and EBADF as non-errors
188 if ((epoll_ctl(epollHandle, EPOLL_CTL_DEL, entry.handle, nullptr) < 0) && (errno != ENOENT) && (errno != EBADF))
189 err() << "Failed to remove socket handle from epoll" << std::endl;
190 }
191 sockets.clear();
192 }
193
194 bool wait(Time timeout)
195 {

Callers

nothing calls this directly

Calls 3

epoll_ctlFunction · 0.85
getMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected