* -------------------------------------------------------------------------
*/
+/*
+ * 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>
# pragma warning(default:4115) /* named type definition in parentheses */
#endif
-#define CLASSNAME "_GSocket_Internal_Window_Class"
-#define WINDOWNAME "_GSocket_Internal_Window_Name"
+#define CLASSNAME TEXT("_GSocket_Internal_Window_Class")
+#define WINDOWNAME TEXT("_GSocket_Internal_Window_Name")
/* Maximum number of different GSocket objects at a given time.
* This value can be modified at will, but it CANNOT be greater
{
EnterCriticalSection(&critical);
socket = socketList[(uMsg - WM_USER)];
- event = -1;
+ event = (GSocketEvent) -1;
cback = NULL;
data = NULL;