]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/socketengines/socketengine_iocp.h
Sort the module list to give a useful indicator of compile progress
[user/henk/code/inspircd.git] / include / socketengines / socketengine_iocp.h
index 118b2fd6f10f4df130dada3fd87d2302817a6453..0f4f6bdf524bfd61f4eaf891fb54a178beef6b97 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *         the file COPYING for details.
@@ -19,7 +19,6 @@
 
 #include "inspircd_config.h"
 #include "inspircd_win32wrapper.h"
-#include "globals.h"
 #include "inspircd.h"
 #include "socketengine.h"
 
@@ -104,14 +103,14 @@ class IOCPEngine : public SocketEngine
                }
                return -1;
        }
-       
+
        /** Global I/O completion port that sockets attach to.
         */
        HANDLE m_completionPort;
 
-       /** This is kinda shitty... :/ for getting an address from a real fd. 
+       /** This is kinda shitty... :/ for getting an address from a real fd.
         */
-       map<int, EventHandler*> m_binding;
+       std::map<int, EventHandler*> m_binding;
 
 public:
        /** Holds the preallocated buffer passed to WSARecvFrom
@@ -122,7 +121,7 @@ public:
        /** Creates an IOCP Socket Engine
         * @param Instance The creator of this object
         */
-       IOCPEngine(InspIRCd* Instance);
+       IOCPEngine();
 
        /** Deletes an IOCP socket engine and all the attached sockets
         */
@@ -132,7 +131,7 @@ public:
         * @param eh EventHandler to add
         * @return True if success, false if no room
         */
-       bool AddFd(EventHandler* eh);
+       bool AddFd(EventHandler* eh, int event_mask);
 
        /** Gets the maximum number of file descriptors that this engine can handle.
         * @return The number of file descriptors
@@ -145,7 +144,7 @@ public:
        __inline int GetRemainingFds()
        {
                register int count = 0;
-               register int i = 0;                     
+               register int i = 0;
                for(; i < MAX_DESCRIPTORS; ++i)
                        if(ref[i] == 0)
                                ++count;
@@ -167,10 +166,7 @@ public:
         */
        std::string GetName();
 
-       /** Queues a Write event on the specified event handler.
-        * @param eh EventHandler that needs data sent on
-        */
-       void WantWrite(EventHandler* eh);
+       void OnSetEvent(EventHandler* eh, int old_mask, int new_mask);
 
        /** Posts a completion event on the specified socket.
         * @param eh EventHandler for message
@@ -235,8 +231,7 @@ class SocketEngineFactory
 public:
        /** Create a new instance of SocketEngine based on IOCPEngine
         */
-       SocketEngine* Create(InspIRCd* Instance) { return new IOCPEngine(Instance); }
+       SocketEngine* Create() { return new IOCPEngine; }
 };
 
 #endif
-