summaryrefslogtreecommitdiff
path: root/src/socketengine.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-07 18:31:21 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-07 18:31:21 +0000
commit61fed23a3e9a62f19c2f88208585b31356c986ef (patch)
tree1b87a0cade91abc4347785879b8506276732f702 /src/socketengine.cpp
parentf7bfee1e9210b83d0cb544ce14aa52f8637bdf21 (diff)
Start moving IO hooking from being bufferedsocket based to residing in EventHandler, this will pave the way for a generic listener type, and also simplifies a lot of code.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10447 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengine.cpp')
-rw-r--r--src/socketengine.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/socketengine.cpp b/src/socketengine.cpp
index c7188b55a..74f8c1861 100644
--- a/src/socketengine.cpp
+++ b/src/socketengine.cpp
@@ -41,6 +41,27 @@
#include "inspircd.h"
#include "socketengine.h"
+bool EventHandler::AddIOHook(Module *IOHooker)
+{
+ if (this->IOHook)
+ return false;
+
+ this->IOHook = IOHooker;
+}
+
+bool EventHandler::DelIOHook()
+{
+ if (!this->IOHook)
+ return false
+
+ this->IOHook = false;
+}
+
+Module *EventHandler::GetIOHook()
+{
+ return this->IOHook;
+}
+
int EventHandler::GetFd()
{
return this->fd;