summaryrefslogtreecommitdiff
path: root/include/socketengine.h
diff options
context:
space:
mode:
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
*/