summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-29 00:19:35 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-29 00:19:35 +0000
commit0bf908e49c957ce35ac194a0c9b739f22d76182e (patch)
tree839be4613f600d34ff5c3285ba3f5840aac24b11 /include
parentbbad4e536234949a1ce480e6c6f901c884621c5e (diff)
Optimizing to not use so much cpu with high user loads
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2691 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/socketengine.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/socketengine.h b/include/socketengine.h
index caccd9b3f..d02ec671a 100644
--- a/include/socketengine.h
+++ b/include/socketengine.h
@@ -19,6 +19,7 @@
#include <vector>
#include <string>
+#include <map>
#include "inspircd_config.h"
#include "globals.h"
#include "inspircd.h"
@@ -65,9 +66,9 @@ const char X_READBIT = 0x80;
*/
class SocketEngine {
- std::vector<int> fds; /* List of file descriptors being monitored */
int EngineHandle; /* Handle to the socket engine if needed */
#ifdef USE_SELECT
+ std::map<int,int> fds; /* List of file descriptors being monitored */
fd_set wfdset, rfdset; /* Readable and writeable sets for select() */
#endif
#ifdef USE_KQUEUE
@@ -132,7 +133,7 @@ public:
* of active file descriptors in the vector
* fdlist which the core may then act upon.
*/
- bool Wait(std::vector<int> &fdlist);
+ int Wait(int* fdlist);
/** Returns the socket engines name
* This returns the name of the engine for use