summaryrefslogtreecommitdiff
path: root/src/socketengine.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-12 11:54:07 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-12 11:54:07 +0000
commit718e7fa3cc47f84ad25b873d83479800f0559899 (patch)
tree9f9d9a430695831afbf6df18ce5b09a0f2d5ee4a /src/socketengine.cpp
parentcef3e32fae0132d51b2fcca16ef05907b174e2a3 (diff)
Added GetType
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2327 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengine.cpp')
-rw-r--r--src/socketengine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/socketengine.cpp b/src/socketengine.cpp
index 0c816943e..e00657a54 100644
--- a/src/socketengine.cpp
+++ b/src/socketengine.cpp
@@ -38,6 +38,12 @@ SocketEngine::~SocketEngine()
#endif
}
+char SocketEngine::GetType(int fd)
+{
+ /* Mask off the top bit used for 'read/write' state */
+ return (ref[fd] & 0x7F);
+}
+
bool SocketEngine::AddFd(int fd, bool readable, char type)
{
this->fds.push_back(fd);