]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/socketengines/socketengine_epoll.cpp
m_spanningtree Log nick collisions more verbosely and in all cases
[user/henk/code/inspircd.git] / src / socketengines / socketengine_epoll.cpp
index 7d919ec9f71ac4a0a466317f2871076f0264aee0..8548e08248a19d52617ba5be1fc6c743e8b104a3 100644 (file)
  */
 
 
-#include <vector>
-#include <string>
-#include <map>
 #include "inspircd.h"
 #include "exitcodes.h"
-#include "socketengine.h"
+
 #include <sys/epoll.h>
 #include <ulimit.h>
 #include <iostream>
@@ -185,7 +182,7 @@ int SocketEngine::DispatchEvents()
                if (ev.events & EPOLLHUP)
                {
                        stats.ErrorEvents++;
-                       eh->HandleEvent(EVENT_ERROR, 0);
+                       eh->OnEventHandlerError(0);
                        continue;
                }
 
@@ -197,7 +194,7 @@ int SocketEngine::DispatchEvents()
                        int errcode;
                        if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &errcode, &codesize) < 0)
                                errcode = errno;
-                       eh->HandleEvent(EVENT_ERROR, errcode);
+                       eh->OnEventHandlerError(errcode);
                        continue;
                }
 
@@ -218,7 +215,7 @@ int SocketEngine::DispatchEvents()
                if (ev.events & EPOLLIN)
                {
                        stats.ReadEvents++;
-                       eh->HandleEvent(EVENT_READ);
+                       eh->OnEventHandlerRead();
                        if (eh != GetRef(fd))
                                // whoa! we got deleted, better not give out the write event
                                continue;
@@ -226,7 +223,7 @@ int SocketEngine::DispatchEvents()
                if (ev.events & EPOLLOUT)
                {
                        stats.WriteEvents++;
-                       eh->HandleEvent(EVENT_WRITE);
+                       eh->OnEventHandlerWrite();
                }
        }