#include #include #include #include /** * It should be possible to cast ol_buf[] to WSABUF[] * see http://msdn.microsoft.com/en-us/library/ms741542(v=vs.85).aspx */ typedef struct _ol_buf { ULONG len; char* base; } ol_buf; typedef struct { OVERLAPPED overlapped; } ol_req_private; typedef struct { union { SOCKET socket; HANDLE handle; }; } ol_handle_private;