summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/Printer.h8
-rw-r--r--includes/Socket.h9
2 files changed, 16 insertions, 1 deletions
diff --git a/includes/Printer.h b/includes/Printer.h
index cd24059..e8d9a03 100644
--- a/includes/Printer.h
+++ b/includes/Printer.h
@@ -20,6 +20,14 @@ enum {
M_MAX = M_ENGINE_DEBUG,
};
+#undef E_STRING
+#undef E_TASK
+#undef E_EVENT
+#undef E_HANDLE
+#undef E_INPUT
+#undef E_SOCKET
+#undef E_THREAD
+
enum {
E_STRING = 1,
E_TASK = 2,
diff --git a/includes/Socket.h b/includes/Socket.h
index 1f20fbb..b762d9b 100644
--- a/includes/Socket.h
+++ b/includes/Socket.h
@@ -1,6 +1,12 @@
#pragma once
+#ifdef _WIN32
+#include <windows.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
#include <netdb.h>
+#endif
#include <Handle.h>
#include <Task.h>
#include <Printer.h>
@@ -53,7 +59,8 @@ class Listener : public Task {
public:
Listener(int port, const char * local = NULL) : m_stop(false) {
m_listener.setLocal(local, port);
- m_listener.listen();
+ bool r = m_listener.listen();
+ Assert(r);
m_name = String(ClassName(this).c_str()) + " - " + m_listener.getName();
Printer::elog(E_SOCKET, "Created a listener task at %p", this);
}