* -------------------------------------------------------------------------
*/
+/*
+ * TODO: for WinCE we need to replace WSAAsyncSelect
+ * (Windows message-based notification of network events for a socket)
+ * with another mechanism.
+ * We may need to have a separate thread that polls for socket events
+ * using select() and sends a message to the main thread.
+ */
+
/*
* PLEASE don't put C++ comments here - this is a C source file.
*/
# pragma warning(disable:4115) /* named type definition in parentheses */
#endif
+/* This needs to be before the wx/defs/h inclusion
+ * for some reason
+ */
+
+#ifdef __WXWINCE__
+#include <windows.h>
+#endif
+
#ifndef __GSOCKET_STANDALONE__
#include "wx/defs.h"
#include "wx/setup.h"
#endif /* __GSOCKET_STANDALONE__ */
+#ifndef __WXWINCE__
#include <assert.h>
+#else
+#define assert(x)
+#include <winsock.h>
+#include "wx/msw/wince/net.h"
+#endif
+
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
{
EnterCriticalSection(&critical);
socket = socketList[(uMsg - WM_USER)];
- event = -1;
+ event = (GSocketEvent) -1;
cback = NULL;
data = NULL;