map<int, EventHandler*> m_binding;
public:
+ /** Holds the preallocated buffer passed to WSARecvFrom
+ * function. Yes, I know, it's a dirty hack.
+ */
+ udp_overlap * udp_ov;
+
/** Creates an IOCP Socket Engine
* @param Instance The creator of this object
*/
*/
EventHandler* GetIntRef(int fd);
- /** Holds the preallocated buffer passed to WSARecvFrom
- * function. Yes, I know, it's a dirty hack.
- */
- udp_overlap * udp_ov;
+ bool BoundsCheckFd(EventHandler* eh);
};
/** Creates a SocketEngine
#define IPC_MESSAGE_DIE 2
#define IPC_MESSAGE_RESTART 3
-void InitIPC()
+void IPC::IPC(InspIRCd* Srv) : Instance(Srv)
{
static DWORD buflen = 1024;
static const char * pipename = "\\\\.\\mailslot\\Inspircd";
printf("IPC Pipe could not be created. Are you sure you didn't start InspIRCd twice?\n");
}
-void CheckIPC(InspIRCd * Instance)
+void IPC::Check()
{
if (hIPCPipe == INVALID_HANDLE_VALUE)
return;
}
}
-void CloseIPC()
+void IPC::~IPC()
{
CloseHandle(hIPCPipe);
}
}
return true;
}
-
-#else
-