From ea271d967c52892a61f2b2db754780912e0f7cef Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 17 Oct 2011 23:06:29 -0700 Subject: Making some adjustments to get the Socket code compiling under mingw32. Doesn't work though; I'm guessing IPv6 isn't really mingw32 thing. At least, it's not WinXP's. Will try later to make something that switches between IPv4 and IPv6 intelligently. --- includes/Socket.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'includes/Socket.h') 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 +#include +#include +#else #include +#endif #include #include #include @@ -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); } -- cgit v1.2.3