summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/socketengine_iocp.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/include/socketengine_iocp.h b/include/socketengine_iocp.h
index 615c44fd7..5de7af03f 100644
--- a/include/socketengine_iocp.h
+++ b/include/socketengine_iocp.h
@@ -14,7 +14,7 @@
#ifndef __SOCKETENGINE_IOCP__
#define __SOCKETENGINE_IOCP__
-#define READ_BUFFER_SIZE 500
+#define READ_BUFFER_SIZE 600
#define USING_IOCP 1
#include "inspircd_config.h"
@@ -37,7 +37,11 @@ class Overlapped
public:
OVERLAPPED m_overlap;
SocketIOEvent m_event;
- int m_params;
+#ifdef WIN64
+ unsigned __int64 m_params;
+#else
+ unsigned long m_params;
+#endif
Overlapped(SocketIOEvent ev, int params) : m_event(ev), m_params(params)
{
@@ -45,6 +49,14 @@ class Overlapped
}
};
+struct udp_overlap
+{
+ unsigned char udp_buffer[600];
+ unsigned long udp_len;
+ sockaddr udp_sockaddr[2];
+ unsigned long udp_sockaddr_len;
+};
+
struct accept_overlap
{
int socket;
@@ -173,6 +185,11 @@ public:
* @return A pointer to the event handler, or NULL
*/
EventHandler* GetIntRef(int fd);
+
+ /** Holds the preallocated buffer passed to WSARecvFrom
+ * function. Yes, I know, it's a dirty hack.
+ */
+ udp_overlap * udp_ov;
};
//typedef void(*OpHandler)(EventHandler)