summaryrefslogtreecommitdiff
path: root/include/inspsocket.h
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-08-08 14:31:49 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-08-08 14:31:49 +0200
commiteef55acb1dbb2ae6c0202fec54e12506c064f892 (patch)
treed7e4e3e313053294192715d9f7bca1b426b8d232 /include/inspsocket.h
parent3a11a742ba35155e1b2e14dc4ef1a4f7f659ea13 (diff)
Add StreamSocket::GetModHook() for obtaining the IOHook belonging to a given module
Use it to simplify logic in all modules using or providing IOHooks
Diffstat (limited to 'include/inspsocket.h')
-rw-r--r--include/inspsocket.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/inspsocket.h b/include/inspsocket.h
index 53eca2e91..72fb03d58 100644
--- a/include/inspsocket.h
+++ b/include/inspsocket.h
@@ -284,6 +284,12 @@ class CoreExport StreamSocket : public EventHandler
virtual void Close();
/** This ensures that close is called prior to destructor */
virtual CullResult cull();
+
+ /** Get the IOHook of a module attached to this socket
+ * @param mod Module whose IOHook to return
+ * @return IOHook belonging to the module or NULL if the module haven't attached an IOHook to this socket
+ */
+ IOHook* GetModHook(Module* mod) const;
};
/**
* BufferedSocket is an extendable socket class which modules