1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 01:46:38 +02:00

Added kqueue

This commit is contained in:
Adam
2011-08-28 21:30:49 -04:00
parent 700a585b1b
commit c6d3fbdfab
6 changed files with 165 additions and 39 deletions
+3 -12
View File
@@ -142,13 +142,13 @@ void SocketEngine::Process()
continue;
Socket *s = it->second;
if (s->HasFlag(SF_DEAD))
continue;
if (ev->revents & (POLLERR | POLLRDHUP))
{
socklen_t sz = sizeof(errno);
getsockopt(s->GetFD(), SOL_SOCKET, SO_ERROR, &errno, &sz);
s->ProcessError();
s->SetFlag(SF_DEAD);
delete s;
continue;
}
@@ -160,15 +160,6 @@ void SocketEngine::Process()
if ((ev->revents & POLLOUT) && !s->ProcessWrite())
s->SetFlag(SF_DEAD);
}
for (int i = 0; i < SocketCount; ++i)
{
pollfd *ev = &events[i];
std::map<int, Socket *>::iterator it = Sockets.find(ev->fd);
if (it == Sockets.end())
continue;
Socket *s = it->second;
if (s->HasFlag(SF_DEAD))
delete s;