* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 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.
#include "inspircd_config.h"
#include "inspircd_win32wrapper.h"
-#include "globals.h"
#include "inspircd.h"
#include "socketengine.h"
}
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
/** 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
*/
* @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
__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;
*/
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
public:
/** Create a new instance of SocketEngine based on IOCPEngine
*/
- SocketEngine* Create(InspIRCd* Instance) { return new IOCPEngine(Instance); }
+ SocketEngine* Create() { return new IOCPEngine; }
};
#endif
-