X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsocketengine.cpp;h=0a071796480cf78d731b559bc2fb1022ee9a8397;hb=cbb95cffac2fe5533bae8bf5dc2ce62fb0f17c2f;hp=9a007cc2652f865a45e71742d21893e4f236a3c6;hpb=6a869d0701bbfe3c7a5e370793adfda4b5b45c65;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/socketengine.cpp b/src/socketengine.cpp index 9a007cc26..0a0717964 100644 --- a/src/socketengine.cpp +++ b/src/socketengine.cpp @@ -14,9 +14,15 @@ /* $Core */ /********* DEFAULTS **********/ + /* $ExtraSources: socketengines/socketengine_select.cpp */ /* $ExtraObjects: socketengine_select.o */ +/* $If: USE_POLL */ +/* $ExtraSources: socketengines/socketengine_poll.cpp */ +/* $ExtraObjects: socketengine_poll.o */ +/* $EndIf */ + /* $If: USE_KQUEUE */ /* $ExtraSources: socketengines/socketengine_kqueue.cpp */ /* $ExtraObjects: socketengine_kqueue.o */ @@ -35,6 +41,34 @@ #include "inspircd.h" #include "socketengine.h" +EventHandler::EventHandler() +{ + this->IOHook = NULL; +} + +bool EventHandler::AddIOHook(Module *IOHooker) +{ + if (this->IOHook) + return false; + + this->IOHook = IOHooker; + return true; +} + +bool EventHandler::DelIOHook() +{ + if (!this->IOHook) + return false; + + this->IOHook = NULL; + return true; +} + +Module *EventHandler::GetIOHook() +{ + return this->IOHook; +} + int EventHandler::GetFd() { return this->fd;