summaryrefslogtreecommitdiff
path: root/src/socketengines/socketengine_select.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socketengines/socketengine_select.cpp')
-rw-r--r--src/socketengines/socketengine_select.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp
index be4a7d186..42f634db1 100644
--- a/src/socketengines/socketengine_select.cpp
+++ b/src/socketengines/socketengine_select.cpp
@@ -20,7 +20,6 @@
#include "inspircd.h"
-#include "socketengine.h"
#ifndef _WIN32
#include <sys/select.h>
@@ -142,26 +141,24 @@ int SocketEngine::DispatchEvents()
if (getsockopt(i, SOL_SOCKET, SO_ERROR, (char*)&errcode, &codesize) < 0)
errcode = errno;
- ev->HandleEvent(EVENT_ERROR, errcode);
+ ev->OnEventHandlerError(errcode);
continue;
}
if (has_read)
{
- stats.ReadEvents++;
ev->SetEventMask(ev->GetEventMask() & ~FD_READ_WILL_BLOCK);
- ev->HandleEvent(EVENT_READ);
+ ev->OnEventHandlerRead();
if (ev != GetRef(i))
continue;
}
if (has_write)
{
- stats.WriteEvents++;
int newmask = (ev->GetEventMask() & ~(FD_WRITE_WILL_BLOCK | FD_WANT_SINGLE_WRITE));
SocketEngine::OnSetEvent(ev, ev->GetEventMask(), newmask);
ev->SetEventMask(newmask);
- ev->HandleEvent(EVENT_WRITE);
+ ev->OnEventHandlerWrite();
}
}