summaryrefslogtreecommitdiff
path: root/include/socketengine.h
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 /include/socketengine.h
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 'include/socketengine.h')
-rw-r--r--include/socketengine.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/socketengine.h b/include/socketengine.h
index f16ec3fea..127a2fd90 100644
--- a/include/socketengine.h
+++ b/include/socketengine.h
@@ -68,8 +68,28 @@ class CoreExport EventHandler : public Extensible
* other forms of IPC.
*/
int fd;
+
+ /** Pointer to the module which has hooked the given EventHandler for IO events.
+ */
+ Module *IOHook;
public:
+ /** Return the current hooker of IO events for this socket, or NULL.
+ * @return Hooker module, if set, or NULL.
+ */
+ Module *GetIOHook();
+
+ /** Set a module as hooking IO events on this socket.
+ * @param IOHooker The module hooking IO
+ * @return True if the hook could be added, false otherwise.
+ */
+ bool AddIOHook(Module *IOHooker);
+
+ /** Remove IO hooking from a module
+ * @return True if hooking was successfully removed, false otherwise.
+ */
+ bool DelIOHook();
+
/** Get the current file descriptor
* @return The file descriptor of this handler
*/