summaryrefslogtreecommitdiff
path: root/src/socketengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socketengine.cpp')
-rw-r--r--src/socketengine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/socketengine.cpp b/src/socketengine.cpp
index 3df9c2135..bcc8e23af 100644
--- a/src/socketengine.cpp
+++ b/src/socketengine.cpp
@@ -112,6 +112,13 @@ bool SocketEngine::AddFd(int fd, bool readable, char type)
return true;
}
+bool SocketEngine::HasFd(int fd)
+{
+ if ((fd < 0) || (fd > MAX_DESCRIPTORS))
+ return false;
+ return (ref[fd] != 0);
+}
+
bool SocketEngine::DelFd(int fd)
{
log(DEBUG,"SocketEngine::DelFd(%d)",fd);