summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-02-15 05:58:19 +0000
committerSadie Powell <sadie@witchery.services>2020-02-15 06:25:12 +0000
commit24f1224f770eb8f6a075d3c8bd083545c17bba10 (patch)
tree2955e3c0e789f8b3fd872a2e52d1fa3dda4b8656 /include
parentf9b4c280f8e7bec0c9237f9648c4fc5a77cfc468 (diff)
Add HasFd to EventHandler and switch code to use it.
Diffstat (limited to 'include')
-rw-r--r--include/socketengine.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/socketengine.h b/include/socketengine.h
index e54dfca97..2b759dad8 100644
--- a/include/socketengine.h
+++ b/include/socketengine.h
@@ -182,6 +182,9 @@ class CoreExport EventHandler : public classbase
*/
inline int GetFd() const { return fd; }
+ /** Checks if this event handler has a fd associated with it. */
+ inline bool HasFd() const { return fd >= 0; }
+
inline int GetEventMask() const { return event_mask; }
/** Set a new file desciptor