From 718e7fa3cc47f84ad25b873d83479800f0559899 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 12 Dec 2005 11:54:07 +0000 Subject: Added GetType git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2327 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socketengine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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); -- cgit v1.2.3