diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-08 14:31:49 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-08 14:31:49 +0200 |
commit | eef55acb1dbb2ae6c0202fec54e12506c064f892 (patch) | |
tree | d7e4e3e313053294192715d9f7bca1b426b8d232 /include/inspsocket.h | |
parent | 3a11a742ba35155e1b2e14dc4ef1a4f7f659ea13 (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.h | 6 |
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 |