event_mask = 0;
}
+void EventHandler::SwapInternals(EventHandler& other)
+{
+ std::swap(fd, other.fd);
+ std::swap(event_mask, other.event_mask);
+}
+
void EventHandler::SetFd(int FD)
{
this->fd = FD;
void SocketEngine::LookupMaxFds()
{
+#if defined _WIN32
+ MaxSetSize = FD_SETSIZE;
+#else
struct rlimit limits;
if (!getrlimit(RLIMIT_NOFILE, &limits))
MaxSetSize = limits.rlim_cur;
#endif
if (!setrlimit(RLIMIT_NOFILE, &limits))
MaxSetSize = limits.rlim_cur;
+#endif
}
void SocketEngine::ChangeEventMask(EventHandler* eh, int change)